diff options
author | gluh@mysql.com/gluh.(none) <> | 2006-08-08 16:03:42 +0500 |
---|---|---|
committer | gluh@mysql.com/gluh.(none) <> | 2006-08-08 16:03:42 +0500 |
commit | 7e07425b2b10a23fc864b0e5ee11e264f19f547c (patch) | |
tree | 475ca7e04f6aa86e1aaadb5b9381c3f76cb6cf95 /strings | |
parent | 91c118e224b1ef4c741bee9a0c533e4b2c34c812 (diff) | |
download | mariadb-git-7e07425b2b10a23fc864b0e5ee11e264f19f547c.tar.gz |
Bug#16172 DECIMAL data type processed incorrectly
issue an 'overflow warning' if result value is bigger than max possible value
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 736dc2e57c4..4ff2b5a693a 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -1896,6 +1896,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)) |