diff options
author | holyfoot/hf@mysql.com/hfmain.(none) <> | 2007-05-09 17:27:14 +0500 |
---|---|---|
committer | holyfoot/hf@mysql.com/hfmain.(none) <> | 2007-05-09 17:27:14 +0500 |
commit | e3fa9c594d4eb5520f8d81002c51072ee37191d7 (patch) | |
tree | 21aa376a9aa5991c76af22780339740739f6451a /strings/decimal.c | |
parent | 6ca4db2607f9fa34bbb79f6f2e5066e1d86d93c7 (diff) | |
download | mariadb-git-e3fa9c594d4eb5520f8d81002c51072ee37191d7.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
Diffstat (limited to 'strings/decimal.c')
-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)) |