~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/functions/signed.cc

  • Committer: Mark Atwood
  • Date: 2008-10-16 11:33:16 UTC
  • mto: (520.1.13 drizzle)
  • mto: This revision was merged to the branch mainline in revision 530.
  • Revision ID: mark@fallenpegasus.com-20081016113316-ff6jdt31ck90sjdh
an implemention of the errmsg plugin

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#include <drizzled/server_includes.h>
21
21
#include CSTDINT_H
22
 
#include <drizzled/error.h>
 
22
#include <drizzled/drizzled_error_messages.h>
23
23
#include <drizzled/functions/signed.h>
24
24
 
25
25
void Item_func_signed::print(String *str, enum_query_type query_type)
59
59
    char err_buff[128];
60
60
    String err_tmp(err_buff,(uint32_t) sizeof(err_buff), system_charset_info);
61
61
    err_tmp.copy(start, length, system_charset_info);
62
 
    push_warning_printf(current_session, DRIZZLE_ERROR::WARN_LEVEL_WARN,
 
62
    push_warning_printf(current_thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
63
63
                        ER_TRUNCATED_WRONG_VALUE,
64
64
                        ER(ER_TRUNCATED_WRONG_VALUE), "INTEGER",
65
65
                        err_tmp.c_ptr());
84
84
  value= val_int_from_str(&error);
85
85
  if (value < 0 && error == 0)
86
86
  {
87
 
    push_warning(current_session, DRIZZLE_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
 
87
    push_warning(current_thd, DRIZZLE_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
88
88
                 "Cast to signed converted positive out-of-range integer to "
89
89
                 "it's negative complement");
90
90
  }