~stewart/drizzle/docs-improvements-1

« back to all changes in this revision

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

merged with up to date trunk

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
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
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
58
58
  See Item_func_plus::decimal_op for comments.
59
59
*/
60
60
 
61
 
my_decimal *Item_func_minus::decimal_op(my_decimal *decimal_value)
 
61
type::Decimal *Item_func_minus::decimal_op(type::Decimal *decimal_value)
62
62
{
63
 
  my_decimal value1, *val1;
64
 
  my_decimal value2, *val2=
 
63
  type::Decimal value1, *val1;
 
64
  type::Decimal value2, *val2=
65
65
 
66
66
  val1= args[0]->val_decimal(&value1);
67
67
  if ((null_value= args[0]->null_value))
68
68
    return 0;
69
69
  val2= args[1]->val_decimal(&value2);
70
70
  if (!(null_value= (args[1]->null_value ||
71
 
                     (my_decimal_sub(E_DEC_FATAL_ERROR, decimal_value, val1,
 
71
                     (class_decimal_sub(E_DEC_FATAL_ERROR, decimal_value, val1,
72
72
                                     val2) > 3))))
73
73
    return decimal_value;
74
74
  return 0;