~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item_timefunc.cc

  • Committer: Felipe
  • Date: 2008-08-04 23:58:04 UTC
  • mto: (261.2.6 codestyle)
  • mto: This revision was merged to the branch mainline in revision 263.
  • Revision ID: felipe@pena-20080804235804-x55q2xqxcar6u66f
- Renamed MYSQL_ERROR to DRIZZLE_ERROR.

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
  if (!warning)
125
125
    return 0;
126
126
 
127
 
  make_truncated_value_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 
127
  make_truncated_value_warning(current_thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
128
128
                               str->ptr(), str->length(),
129
129
                               DRIZZLE_TIMESTAMP_TIME, NullS);
130
130
  return make_datetime(format, ltime, str);
151
151
    return 1;
152
152
  if (warning)
153
153
  {
154
 
    make_truncated_value_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 
154
    make_truncated_value_warning(current_thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
155
155
                                 str->ptr(), str->length(),
156
156
                                 DRIZZLE_TIMESTAMP_TIME, NullS);
157
157
    make_time(format, l_time, str);
214
214
  char buf[22];
215
215
  int len= (int)(int64_t10_to_str(seconds, buf, unsigned_flag ? 10 : -10)
216
216
                 - buf);
217
 
  make_truncated_value_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 
217
  make_truncated_value_warning(current_thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
218
218
                               buf, len, DRIZZLE_TIMESTAMP_TIME,
219
219
                               NullS);
220
220
  
582
582
    {
583
583
      if (!my_isspace(&my_charset_latin1,*val))
584
584
      {
585
 
        make_truncated_value_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 
585
        make_truncated_value_warning(current_thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
586
586
                                     val_begin, length,
587
587
                                     cached_timestamp_type, NullS);
588
588
        break;
595
595
  {
596
596
    char buff[128];
597
597
    strmake(buff, val_begin, min(length, sizeof(buff)-1));
598
 
    push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
 
598
    push_warning_printf(current_thd, DRIZZLE_ERROR::WARN_LEVEL_ERROR,
599
599
                        ER_WRONG_VALUE_FOR_TYPE, ER(ER_WRONG_VALUE_FOR_TYPE),
600
600
                        date_time_type, buff, "str_to_date");
601
601
  }
2359
2359
        str_value= *res;                        // Not malloced string
2360
2360
        res= &str_value;
2361
2361
      }
2362
 
      push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 
2362
      push_warning_printf(current_thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
2363
2363
                          ER_TRUNCATED_WRONG_VALUE,
2364
2364
                          ER(ER_TRUNCATED_WRONG_VALUE), char_type,
2365
2365
                          res->c_ptr_safe());
2847
2847
    char *ptr= int64_t10_to_str(hour, buf, args[0]->unsigned_flag ? 10 : -10);
2848
2848
    int len = (int)(ptr - buf) +
2849
2849
      sprintf(ptr, ":%02u:%02u", (uint)minute, (uint)second);
2850
 
    make_truncated_value_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 
2850
    make_truncated_value_warning(current_thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
2851
2851
                                 buf, len, DRIZZLE_TIMESTAMP_TIME,
2852
2852
                                 NullS);
2853
2853
  }