~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/string.cc

  • Committer: Brian Aker
  • Date: 2010-12-27 19:16:17 UTC
  • mto: This revision was merged to the branch mainline in revision 2036.
  • Revision ID: brian@tangent.org-20101227191617-b1jesi0g2okc06nj
Improvement for decimal in encapsulation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include <config.h>
 
20
#include "config.h"
21
21
 
22
22
#include <drizzled/session.h>
23
23
#include <drizzled/error.h>
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());