~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/math/neg.cc

  • Committer: Monty Taylor
  • Date: 2010-12-26 03:15:44 UTC
  • mto: This revision was merged to the branch mainline in revision 2038.
  • Revision ID: mordred@inaugust.com-20101226031544-1cf3raipu53fnmyj
Through page.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
{
37
37
  int64_t value= args[0]->val_int();
38
38
  null_value= args[0]->null_value;
39
 
 
40
39
  return -value;
41
40
}
42
41
 
43
42
 
44
 
type::Decimal *Item_func_neg::decimal_op(type::Decimal *decimal_value)
 
43
my_decimal *Item_func_neg::decimal_op(my_decimal *decimal_value)
45
44
{
46
 
  type::Decimal val, *value= args[0]->val_decimal(&val);
 
45
  my_decimal val, *value= args[0]->val_decimal(&val);
47
46
  if (!(null_value= args[0]->null_value))
48
47
  {
49
 
    class_decimal2decimal(value, decimal_value);
50
 
    class_decimal_neg(decimal_value);
 
48
    my_decimal2decimal(value, decimal_value);
 
49
    my_decimal_neg(decimal_value);
51
50
    return decimal_value;
52
51
  }
53
52
  return 0;
86
85
      hybrid_type= DECIMAL_RESULT;
87
86
    }
88
87
  }
89
 
  unsigned_flag= false;
 
88
  unsigned_flag= 0;
 
89
  return;
90
90
}
91
91
 
92
92
} /* namespace drizzled */