~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/string.cc

  • Committer: Brian Aker
  • Date: 2010-12-25 00:28:49 UTC
  • mto: This revision was merged to the branch mainline in revision 2031.
  • Revision ID: brian@tangent.org-20101225002849-g73mg6ihulajis0o
First pass in refactoring of the name of my_decimal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
    */
46
46
    return NULL;
47
47
  }
48
 
 
49
 
  if (!(ptr= getSession().strmake(cstr.ptr(), cstr.length())))
 
48
  if (!(ptr= current_session->strmake(cstr.ptr(), cstr.length())))
50
49
    return NULL;
51
 
 
52
50
  conv->str_value.set(ptr, cstr.length(), cstr.charset());
53
51
  /* Ensure that no one is going to change the result string */
54
52
  conv->str_value.mark_as_const();
127
125
      We can use str_value.ptr() here as Item_string is gurantee to put an
128
126
      end \0 here.
129
127
    */
130
 
    push_warning_printf(&getSession(), DRIZZLE_ERROR::WARN_LEVEL_WARN,
 
128
    push_warning_printf(current_session, DRIZZLE_ERROR::WARN_LEVEL_WARN,
131
129
                        ER_TRUNCATED_WRONG_VALUE,
132
130
                        ER(ER_TRUNCATED_WRONG_VALUE), "DOUBLE",
133
131
                        str_value.ptr());
156
154
  if (err > 0 ||
157
155
      (end != org_end && !check_if_only_end_space(cs, end, org_end)))
158
156
  {
159
 
    push_warning_printf(&getSession(), DRIZZLE_ERROR::WARN_LEVEL_WARN,
 
157
    push_warning_printf(current_session, DRIZZLE_ERROR::WARN_LEVEL_WARN,
160
158
                        ER_TRUNCATED_WRONG_VALUE,
161
159
                        ER(ER_TRUNCATED_WRONG_VALUE), "INTEGER",
162
160
                        str_value.ptr());
164
162
  return tmp;
165
163
}
166
164
 
167
 
type::Decimal *Item_string::val_decimal(type::Decimal *decimal_value)
 
165
my_decimal *Item_string::val_decimal(my_decimal *decimal_value)
168
166
{
169
167
  return val_decimal_from_string(decimal_value);
170
168
}