~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item_timefunc.cc

Much closer toward UTF8 being around all the time...

Show diffs side-by-side

added added

removed removed

Lines of Context:
390
390
      case 'p':
391
391
        if (val_len < 2 || ! usa_time)
392
392
          goto err;
393
 
        if (!my_strnncoll(&my_charset_latin1,
 
393
        if (!my_strnncoll(&my_charset_utf8_general_ci,
394
394
                          (const uchar *) val, 2, 
395
395
                          (const uchar *) "PM", 2))
396
396
          daypart= 12;
397
 
        else if (my_strnncoll(&my_charset_latin1,
 
397
        else if (my_strnncoll(&my_charset_utf8_general_ci,
398
398
                              (const uchar *) val, 2, 
399
399
                              (const uchar *) "AM", 2))
400
400
          goto err;
575
575
  {
576
576
    do
577
577
    {
578
 
      if (!my_isspace(&my_charset_latin1,*val))
 
578
      if (!my_isspace(&my_charset_utf8_general_ci,*val))
579
579
      {
580
580
        make_truncated_value_warning(current_thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
581
581
                                     val_begin, length,
2406
2406
  from_cs= (args[0]->result_type() == INT_RESULT || 
2407
2407
            args[0]->result_type() == DECIMAL_RESULT ||
2408
2408
            args[0]->result_type() == REAL_RESULT) ?
2409
 
           (cast_cs->mbminlen == 1 ? cast_cs : &my_charset_latin1) :
 
2409
           (cast_cs->mbminlen == 1 ? cast_cs : &my_charset_utf8_general_ci) :
2410
2410
           args[0]->collation.collation;
2411
2411
  charset_conversion= (cast_cs->mbmaxlen > 1) ||
2412
2412
                      (!my_charset_same(from_cs, cast_cs) && from_cs != &my_charset_bin && cast_cs != &my_charset_bin);
3044
3044
    uint format_name_len;
3045
3045
    format_name_len= strlen(format_name);
3046
3046
    if (val_len == format_name_len &&
3047
 
        !my_strnncoll(&my_charset_latin1, 
 
3047
        !my_strnncoll(&my_charset_utf8_general_ci, 
3048
3048
                      (const uchar *) val->ptr(), val_len, 
3049
3049
                      (const uchar *) format_name, val_len))
3050
3050
    {