~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: patrick crews
  • Date: 2010-09-29 15:15:19 UTC
  • mfrom: (1099.4.188 drizzle)
  • Revision ID: gleebix@gmail.com-20100929151519-6mrmzd1ciw2p9nws
Tags: 2010.09.1802
Update translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
53
53
    \# Value of operation as a decimal
54
54
*/
55
55
 
56
 
type::Decimal *Item_func_plus::decimal_op(type::Decimal *decimal_value)
 
56
my_decimal *Item_func_plus::decimal_op(my_decimal *decimal_value)
57
57
{
58
 
  type::Decimal value1, *val1;
59
 
  type::Decimal value2, *val2;
 
58
  my_decimal value1, *val1;
 
59
  my_decimal value2, *val2;
60
60
  val1= args[0]->val_decimal(&value1);
61
61
  if ((null_value= args[0]->null_value))
62
62
    return 0;
63
63
  val2= args[1]->val_decimal(&value2);
64
64
  if (!(null_value= (args[1]->null_value ||
65
 
                     (class_decimal_add(E_DEC_FATAL_ERROR, decimal_value, val1,
 
65
                     (my_decimal_add(E_DEC_FATAL_ERROR, decimal_value, val1,
66
66
                                     val2) > 3))))
67
67
    return decimal_value;
68
68
  return 0;