~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/decimal.cc

  • Committer: Andrew Hutchings
  • Date: 2010-09-26 08:33:47 UTC
  • mto: (1795.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1796.
  • Revision ID: andrew@linuxjedi.co.uk-20100926083347-fzsc9e7w0j4u7bj1
Disable boost:po allow_guessing which was making some wrong assumptions

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);