~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/decimal.cc

  • Committer: Lee Bieber
  • Date: 2010-08-21 22:42:44 UTC
  • mto: (1727.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1728.
  • Revision ID: lbieber@kalebral-2.local-20100821224244-kh3gmsvi45dlbuu1
For the feature request (https://blueprints.launchpad.net/drizzle/+spec/limit-maximum-sort-size) 
that is requesting the ability to cap various buffers, we first tried setting the join buffer to 
1 to see how that would affect the test results and expose test results that need to 
sorted (by adding --sorted_result). 

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