~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/decimal.cc

  • Committer: Brian Aker
  • Date: 2010-12-25 00:28:49 UTC
  • mto: This revision was merged to the branch mainline in revision 2031.
  • Revision ID: brian@tangent.org-20101225002849-g73mg6ihulajis0o
First pass in refactoring of the name of my_decimal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
206
206
    one if the user only wanted decimal places, but we force a leading
207
207
    zero on them. Because the type is implicitly UNSIGNED, we do not
208
208
    need to reserve a character for the sign. For all other cases,
209
 
    fixed_prec will be 0, and my_decimal_string_length() will be called
 
209
    fixed_prec will be 0, and class_decimal_string_length() will be called
210
210
    instead to calculate the required size of the buffer.
211
211
  */
212
212
  int length= (int)(fixed_prec
213
213
                    ? (uint32_t)(fixed_prec + ((fixed_prec == fixed_dec) ? 1 : 0) + 1)
214
 
                    : (uint32_t)my_decimal_string_length(d));
 
214
                    : (uint32_t)class_decimal_string_length(d));
215
215
  int result;
216
216
  if (str->alloc(length))
217
217
    return check_result(mask, E_DEC_OOM);
330
330
}
331
331
 
332
332
 
333
 
void my_decimal_trim(uint32_t *precision, uint32_t *scale)
 
333
void class_decimal_trim(uint32_t *precision, uint32_t *scale)
334
334
{
335
335
  if (!(*precision) && !(*scale))
336
336
  {