diff options
author | unknown <jimw@mysql.com> | 2005-06-22 20:00:21 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-06-22 20:00:21 -0700 |
commit | 5841d70af8ea31288398229926dd647a7bacd852 (patch) | |
tree | 9885afeafab52816111eb92fae2b101971f1d469 /mysql-test/t/func_math.test | |
parent | 31d07866873631f79177fb1277bacfec62062c80 (diff) | |
download | mariadb-git-5841d70af8ea31288398229926dd647a7bacd852.tar.gz |
Fix multiplication of abs() by a negative value. (Bug #11402)
mysql-test/r/func_math.result:
Add new results
mysql-test/t/func_math.test:
Add new regression test
sql/item_func.cc:
Don't set result of abs() to unsigned. Result should still be
a signed value, even if always positive.
Diffstat (limited to 'mysql-test/t/func_math.test')
-rw-r--r-- | mysql-test/t/func_math.test | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index 4c24dae8c5d..11af874380e 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -71,3 +71,8 @@ create table t1 select round(1, 6); show create table t1; select * from t1; drop table t1; + +# +# Bug #11402: abs() forces rest of calculation to unsigned +# +select abs(-2) * -2; |