~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/string.cc

  • Committer: Andrew Hutchings
  • Date: 2011-02-07 17:20:59 UTC
  • mfrom: (2148 staging)
  • mto: (2148.2.3 build)
  • mto: This revision was merged to the branch mainline in revision 2149.
  • Revision ID: andrew@linuxjedi.co.uk-20110207172059-dyeahrgzrlincoe3
Merge with trunk

Show diffs side-by-side

added added

removed removed

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