~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field.cc

  • Committer: Brian Aker
  • Date: 2010-12-27 19:18:58 UTC
  • mfrom: (2035 staging)
  • mto: (2035.1.1 clean)
  • mto: This revision was merged to the branch mainline in revision 2037.
  • Revision ID: brian@tangent.org-20101227191858-h11rg8ncrkiklg3f
Manage merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
877
877
  return(result);
878
878
}
879
879
 
880
 
my_decimal *Field::val_decimal(my_decimal *)
 
880
type::Decimal *Field::val_decimal(type::Decimal *)
881
881
{
882
882
  /* This never have to be called */
883
883
  assert(0);
912
912
  field->decimals= 0;
913
913
}
914
914
 
915
 
int64_t Field::convert_decimal2int64_t(const my_decimal *val, bool, int *err)
 
915
int64_t Field::convert_decimal2int64_t(const type::Decimal *val, bool, int *err)
916
916
{
917
917
  int64_t i;
918
 
  if (warn_if_overflow(my_decimal2int(E_DEC_ERROR &
 
918
  if (warn_if_overflow(class_decimal2int(E_DEC_ERROR &
919
919
                                      ~E_DEC_OVERFLOW & ~E_DEC_TRUNCATED,
920
920
                                      val, false, &i)))
921
921
  {
946
946
  return copy->length+ store_length;
947
947
}
948
948
 
949
 
bool Field::get_date(DRIZZLE_TIME *ltime,uint32_t fuzzydate)
 
949
bool Field::get_date(type::Time *ltime,uint32_t fuzzydate)
950
950
{
951
951
  char buff[40];
952
952
  String tmp(buff,sizeof(buff),&my_charset_bin),*res;
959
959
  return 0;
960
960
}
961
961
 
962
 
bool Field::get_time(DRIZZLE_TIME *ltime)
 
962
bool Field::get_time(type::Time *ltime)
963
963
{
964
964
  char buff[40];
965
965
  String tmp(buff,sizeof(buff),&my_charset_bin),*res;
972
972
  return 0;
973
973
}
974
974
 
975
 
int Field::store_time(DRIZZLE_TIME *ltime, enum enum_drizzle_timestamp_type)
 
975
int Field::store_time(type::Time *ltime, enum enum_drizzle_timestamp_type)
976
976
{
977
977
  char buff[MAX_DATE_STRING_REP_LENGTH];
978
978
  uint32_t length= (uint32_t) my_TIME_to_str(ltime, buff);