~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/string.cc

  • Committer: Brian Aker
  • Date: 2011-01-06 05:17:09 UTC
  • Revision ID: brian@tangent.org-20110106051709-oa0se8ur02uc6i9o
Added native functions into the function table.

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());