~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/str/format.cc

  • Committer: Brian Aker
  • Date: 2009-09-23 21:40:36 UTC
  • mfrom: (971.6.13 eday-purecov)
  • Revision ID: brian@gaz-20090923214036-bustj80ei8ysbayf
Old message removal by Eric (no actual code has been harmed in the production of
this patch...)

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
    my_decimal dec_val, rnd_dec, *res;
82
82
    res= args[0]->val_decimal(&dec_val);
83
83
    if ((null_value=args[0]->null_value))
84
 
      return 0; /* purecov: inspected */
 
84
      return 0;
85
85
    my_decimal_round(E_DEC_FATAL_ERROR, res, dec, false, &rnd_dec);
86
86
    my_decimal2string(E_DEC_FATAL_ERROR, &rnd_dec, 0, 0, 0, str);
87
87
    str_length= str->length();
92
92
  {
93
93
    double nr= args[0]->val_real();
94
94
    if ((null_value=args[0]->null_value))
95
 
      return 0; /* purecov: inspected */
 
95
      return 0;
96
96
    nr= my_double_round(nr, (int64_t) dec, false, false);
97
97
    /* Here default_charset() is right as this is not an automatic conversion */
98
98
    str->set_real(nr, dec, default_charset());