summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2009-11-02 09:21:39 -0200
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2009-11-02 09:21:39 -0200
commit1ca80ed19e14d8d5837fa900ad75ec1a7a7856e1 (patch)
treebb35488e2d55c68d42dd179686f0b5b6949f7055 /sql/item.h
parentcd167ee2e9dd4b2e51b0df426542f71c4daa4a02 (diff)
downloadmariadb-git-1ca80ed19e14d8d5837fa900ad75ec1a7a7856e1.tar.gz
Bug#48370: Absolutely wrong calculations with GROUP BY and decimal fields when using IF
Bug#45261: Crash, stored procedure + decimal Revert fix for Bug#45261 due to unforeseen bugs.
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/item.h b/sql/item.h
index 405588917ee..3a4b6e53b3a 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -762,10 +762,9 @@ public:
virtual cond_result eq_cmp_result() const { return COND_OK; }
inline uint float_length(uint decimals_par) const
{ return decimals != NOT_FIXED_DEC ? (DBL_DIG+2+decimals_par) : DBL_DIG+8;}
- /** Returns the uncapped decimal precision of this item. */
virtual uint decimal_precision() const;
inline int decimal_int_part() const
- { return decimal_precision() - decimals; }
+ { return my_decimal_int_part(decimal_precision(), decimals); }
/*
Returns true if this is constant (during query execution, i.e. its value
will not change until next fix_fields) and its value is known.