~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item.cc

  • Committer: Brian Aker
  • Date: 2011-01-17 16:48:48 UTC
  • mto: (2097.1.1 drizzle-build)
  • mto: This revision was merged to the branch mainline in revision 2098.
  • Revision ID: brian@tangent.org-20110117164848-x0gl1pvamks5si07
Merge in namespace of enum.

Show diffs side-by-side

added added

removed removed

Lines of Context:
245
245
  if (get_time(&ltime))
246
246
    return set_field_to_null(field);
247
247
  field->set_notnull();
248
 
  return field->store_time(&ltime, DRIZZLE_TIMESTAMP_TIME);
 
248
  return field->store_time(&ltime, type::DRIZZLE_TIMESTAMP_TIME);
249
249
}
250
250
 
251
251
int Item::save_date_in_field(Field *field)
254
254
  if (get_date(&ltime, TIME_FUZZY_DATE))
255
255
    return set_field_to_null(field);
256
256
  field->set_notnull();
257
 
  return field->store_time(&ltime, DRIZZLE_TIMESTAMP_DATETIME);
 
257
  return field->store_time(&ltime, type::DRIZZLE_TIMESTAMP_DATETIME);
258
258
}
259
259
 
260
260
/**
470
470
      String tmp(buff,sizeof(buff), &my_charset_bin),*res;
471
471
      if (!(res=val_str(&tmp)) ||
472
472
          str_to_datetime_with_warn(res->ptr(), res->length(),
473
 
                                    ltime, fuzzydate) <= DRIZZLE_TIMESTAMP_ERROR)
 
473
                                    ltime, fuzzydate) <= type::DRIZZLE_TIMESTAMP_ERROR)
474
474
      {
475
475
        break;
476
476
      }
484
484
        char buff[22], *end;
485
485
        end= internal::int64_t10_to_str(value, buff, -10);
486
486
        make_truncated_value_warning(current_session, DRIZZLE_ERROR::WARN_LEVEL_WARN,
487
 
                                     buff, (int) (end-buff), DRIZZLE_TIMESTAMP_NONE, NULL);
 
487
                                     buff, (int) (end-buff), type::DRIZZLE_TIMESTAMP_NONE, NULL);
488
488
        break;
489
489
      }
490
490
    }