~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field.cc

  • Committer: Andrew Hutchings
  • Date: 2011-02-07 17:20:59 UTC
  • mfrom: (2148 staging)
  • mto: (2148.2.3 build)
  • mto: This revision was merged to the branch mainline in revision 2149.
  • Revision ID: andrew@linuxjedi.co.uk-20110207172059-dyeahrgzrlincoe3
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1008
1008
  return copy->length+ store_length;
1009
1009
}
1010
1010
 
1011
 
bool Field::get_date(type::Time &ltime,uint32_t fuzzydate)
 
1011
bool Field::get_date(type::Time &ltime, uint32_t fuzzydate)
1012
1012
{
1013
 
  char buff[40];
 
1013
  char buff[type::Time::MAX_STRING_LENGTH];
1014
1014
  String tmp(buff,sizeof(buff),&my_charset_bin),*res;
1015
1015
 
1016
1016
  assert(getTable() and getTable()->getSession());
1028
1028
 
1029
1029
bool Field::get_time(type::Time &ltime)
1030
1030
{
1031
 
  char buff[40];
 
1031
  char buff[type::Time::MAX_STRING_LENGTH];
1032
1032
  String tmp(buff,sizeof(buff),&my_charset_bin),*res;
1033
1033
 
1034
 
  if (!(res=val_str_internal(&tmp)) || str_to_time_with_warn(res->ptr(), res->length(), &ltime))
 
1034
  if (not (res= val_str_internal(&tmp)) or
 
1035
      str_to_time_with_warn(getTable()->getSession(), res->ptr(), res->length(), &ltime))
1035
1036
  {
1036
1037
    return true;
1037
1038
  }