~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: lbieber
  • Date: 2010-10-01 13:06:31 UTC
  • mfrom: (1802.2.2 drizzle-bug-651948)
  • mto: This revision was merged to the branch mainline in revision 1805.
  • Revision ID: lbieber@orisndriz08-20101001130631-xubscnhmj7r5dn6g
Merge Andrew - Fix bug 651948 - Index lengths not retrieved using drizzledump

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
28
28
 
29
29
class Item_func_neg :public Item_func_num1
30
30
{
31
 
  bool _is_negative;
32
 
 
33
31
public:
34
 
  Item_func_neg(Item *a) :
35
 
    Item_func_num1(a),
36
 
    _is_negative(true)
37
 
  {}
38
 
 
 
32
  Item_func_neg(Item *a) :Item_func_num1(a) {}
39
33
  double real_op();
40
34
  int64_t int_op();
41
 
  type::Decimal *decimal_op(type::Decimal *);
 
35
  my_decimal *decimal_op(my_decimal *);
42
36
  const char *func_name() const { return "-"; }
43
37
  enum Functype functype() const   { return NEG_FUNC; }
44
38
  void fix_length_and_dec();
45
39
  void fix_num_length_and_dec();
46
40
  uint32_t decimal_precision() const { return args[0]->decimal_precision(); }
47
 
 
48
 
  bool negative() const
49
 
  {
50
 
    return _is_negative;
51
 
  }
52
41
};
53
42
 
54
43
} /* namespace drizzled */