~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/math_functions/ceiling.cc

  • Committer: Brian Aker
  • Date: 2011-01-17 04:15:23 UTC
  • mto: (2088.1.3 merge)
  • mto: This revision was merged to the branch mainline in revision 2089.
  • Revision ID: brian@gir-3-20110117041523-o9ex94kfz1a6iqyw
Modify TableIdentifier to fit with the rest of the identifiers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    break;
35
35
  case DECIMAL_RESULT:
36
36
  {
37
 
    my_decimal dec_buf, *dec;
 
37
    type::Decimal dec_buf, *dec;
38
38
    if ((dec= Item_func_ceiling::decimal_op(&dec_buf)))
39
 
      my_decimal2int(E_DEC_FATAL_ERROR, dec, unsigned_flag, &result);
 
39
      dec->val_int32(E_DEC_FATAL_ERROR, unsigned_flag, &result);
40
40
    else
41
41
      result= 0;
42
42
    break;
58
58
  return ceil(value);
59
59
}
60
60
 
61
 
my_decimal *Item_func_ceiling::decimal_op(my_decimal *decimal_value)
 
61
type::Decimal *Item_func_ceiling::decimal_op(type::Decimal *decimal_value)
62
62
{
63
 
  my_decimal val, *value= args[0]->val_decimal(&val);
 
63
  type::Decimal val, *value= args[0]->val_decimal(&val);
64
64
  if (!(null_value= (args[0]->null_value ||
65
 
                     my_decimal_ceiling(E_DEC_FATAL_ERROR, value,
 
65
                     class_decimal_ceiling(E_DEC_FATAL_ERROR, value,
66
66
                                        decimal_value) > 1)))
67
67
    return decimal_value;
68
68
  return 0;