~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field.cc

  • Committer: Brian Aker
  • Date: 2010-12-27 23:56:33 UTC
  • mfrom: (2034.2.5 clean)
  • Revision ID: brian@tangent.org-20101227235633-9wwf7j35lkf0g262
Merge in additional encapsulation of Decimal

Show diffs side-by-side

added added

removed removed

Lines of Context:
915
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(class_decimal2int(E_DEC_ERROR &
 
918
  if (warn_if_overflow(val->val_int32(E_DEC_ERROR &
919
919
                                      ~E_DEC_OVERFLOW & ~E_DEC_TRUNCATED,
920
 
                                      val, false, &i)))
 
920
                                      false, &i)))
921
921
  {
922
922
    i= (val->sign() ? INT64_MIN : INT64_MAX);
923
923
    *err= 1;