~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/decimal.cc

  • Committer: Monty Taylor
  • Date: 2010-09-28 07:45:44 UTC
  • mto: (1799.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1800.
  • Revision ID: mordred@inaugust.com-20100928074544-s3ujnv6s8wro74l2
Added BSD copying file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
 
125
125
bool Field_decimal::store_value(const my_decimal *decimal_value)
126
126
{
127
 
  int error= my_decimal2binary(E_DEC_FATAL_ERROR & ~E_DEC_OVERFLOW,
128
 
                                         decimal_value, ptr, precision, dec);
129
 
  if (warn_if_overflow(error))
 
127
  int error= 0;
 
128
 
 
129
  if (warn_if_overflow(my_decimal2binary(E_DEC_FATAL_ERROR & ~E_DEC_OVERFLOW,
 
130
                                         decimal_value, ptr, precision, dec)))
130
131
  {
131
 
    if (error != E_DEC_TRUNCATED)
132
 
    {
133
 
      my_decimal buff;
134
 
      set_value_on_overflow(&buff, decimal_value->sign());
135
 
      my_decimal2binary(E_DEC_FATAL_ERROR, &buff, ptr, precision, dec);
136
 
    }
 
132
    my_decimal buff;
 
133
    set_value_on_overflow(&buff, decimal_value->sign());
 
134
    my_decimal2binary(E_DEC_FATAL_ERROR, &buff, ptr, precision, dec);
137
135
    error= 1;
138
136
  }
139
137
  return(error);