diff options
author | unknown <hf@deer.(none)> | 2005-06-08 21:56:22 +0500 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2005-06-08 21:56:22 +0500 |
commit | 1c5c678c139e2a2fbcda19a5d52ca35a07ecc7f9 (patch) | |
tree | b006d4d0d80d76393f851fb0be36971a276bab37 /sql/my_decimal.h | |
parent | 60a5939f565077e4e57ec512139ca86aa0f06364 (diff) | |
download | mariadb-git-1c5c678c139e2a2fbcda19a5d52ca35a07ecc7f9.tar.gz |
Fix for bug #10896 (0.00 > -0.00)
mysql-test/r/type_newdecimal.result:
test result fixed
mysql-test/t/type_newdecimal.test:
test case added
sql/my_decimal.h:
we neede to check for zero here not to get -0.00
Diffstat (limited to 'sql/my_decimal.h')
-rw-r--r-- | sql/my_decimal.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/my_decimal.h b/sql/my_decimal.h index 27fd33cffbe..b65e6aedaa2 100644 --- a/sql/my_decimal.h +++ b/sql/my_decimal.h @@ -290,6 +290,11 @@ int int2my_decimal(uint mask, longlong i, my_bool unsigned_flag, my_decimal *d) inline void my_decimal_neg(decimal_t *arg) { + if (decimal_is_zero(arg)) + { + arg->sign= 0; + return; + } decimal_neg(arg); } |