diff options
author | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-05-09 17:27:14 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-05-09 17:27:14 +0500 |
commit | 82b7c54338a3465790e4e64a647e82b9d7ea59b6 (patch) | |
tree | 21aa376a9aa5991c76af22780339740739f6451a /strings | |
parent | 187ccf4bca5bf865fec86581d894fb8e6df0792a (diff) | |
download | mariadb-git-82b7c54338a3465790e4e64a647e82b9d7ea59b6.tar.gz |
Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
Missing check for overflow added to the Item_decimal_typecast::val_decimal
include/decimal.h:
Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
decimal_intg() declaration
mysql-test/r/cast.result:
Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
result fixed
mysql-test/r/type_newdecimal.result:
Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
test result
mysql-test/t/type_newdecimal.test:
Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
test case added
sql/item_func.cc:
Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
now we check for possible ovreflow in Item_decimal_typecast::val_decimal
sql/my_decimal.h:
Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
my_decimal_intg() implemented
strings/decimal.c:
Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
decimal_intg() implemented
Diffstat (limited to 'strings')
-rw-r--r-- | strings/decimal.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/strings/decimal.c b/strings/decimal.c index ea92174bfc8..65db68b1b59 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -1911,6 +1911,14 @@ static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to) return error; } +int decimal_intg(decimal_t *from) +{ + int res; + dec1 *tmp_res; + tmp_res= remove_leading_zeroes(from, &res); + return res; +} + int decimal_add(decimal_t *from1, decimal_t *from2, decimal_t *to) { if (likely(from1->sign == from2->sign)) |