~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item_func.cc

MergedĀ fromĀ Felipe

Show diffs side-by-side

added added

removed removed

Lines of Context:
607
607
{
608
608
  THD *thd= current_thd;
609
609
  if (thd->variables.sql_mode & MODE_ERROR_FOR_DIVISION_BY_ZERO)
610
 
    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DIVISION_BY_ZERO,
 
610
    push_warning(thd, DRIZZLE_ERROR::WARN_LEVEL_ERROR, ER_DIVISION_BY_ZERO,
611
611
                 ER(ER_DIVISION_BY_ZERO));
612
612
  null_value= 1;
613
613
}
914
914
    char err_buff[128];
915
915
    String err_tmp(err_buff,(uint32_t) sizeof(err_buff), system_charset_info);
916
916
    err_tmp.copy(start, length, system_charset_info);
917
 
    push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 
917
    push_warning_printf(current_thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
918
918
                        ER_TRUNCATED_WRONG_VALUE,
919
919
                        ER(ER_TRUNCATED_WRONG_VALUE), "INTEGER",
920
920
                        err_tmp.c_ptr());
939
939
  value= val_int_from_str(&error);
940
940
  if (value < 0 && error == 0)
941
941
  {
942
 
    push_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
 
942
    push_warning(current_thd, DRIZZLE_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
943
943
                 "Cast to signed converted positive out-of-range integer to "
944
944
                 "it's negative complement");
945
945
  }
980
980
 
981
981
  value= val_int_from_str(&error);
982
982
  if (error < 0)
983
 
    push_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
 
983
    push_warning(current_thd, DRIZZLE_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
984
984
                 "Cast to unsigned converted negative integer to it's "
985
985
                 "positive complement");
986
986
  return value;
1048
1048
  return dec;
1049
1049
 
1050
1050
err:
1051
 
  push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
 
1051
  push_warning_printf(current_thd, DRIZZLE_ERROR::WARN_LEVEL_ERROR,
1052
1052
                      ER_WARN_DATA_OUT_OF_RANGE,
1053
1053
                      ER(ER_WARN_DATA_OUT_OF_RANGE),
1054
1054
                      name, 1);
2857
2857
 
2858
2858
  if (u_d->func_init)
2859
2859
  {
2860
 
    char init_msg_buff[MYSQL_ERRMSG_SIZE];
 
2860
    char init_msg_buff[DRIZZLE_ERRMSG_SIZE];
2861
2861
    char *to=num_buffer;
2862
2862
    for (uint i=0; i < arg_count; i++)
2863
2863
    {
3362
3362
    {
3363
3363
      char buff[22];
3364
3364
      llstr(((int64_t) loop_count), buff);
3365
 
      push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
 
3365
      push_warning_printf(current_thd, DRIZZLE_ERROR::WARN_LEVEL_ERROR,
3366
3366
                          ER_WRONG_VALUE_FOR_TYPE, ER(ER_WRONG_VALUE_FOR_TYPE),
3367
3367
                          "count", buff, "benchmark");
3368
3368
    }