diff options
author | unknown <hf@deer.(none)> | 2005-03-04 23:06:00 +0400 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2005-03-04 23:06:00 +0400 |
commit | 6e362a20b71aa082880e3faf00f9cf6f033b50c1 (patch) | |
tree | a07ebc0c3b62effdc51f62a8761de1e643e681e8 /mysql-test | |
parent | e5be4a137c1ab712854985d2c9faca57f69b41df (diff) | |
download | mariadb-git-6e362a20b71aa082880e3faf00f9cf6f033b50c1.tar.gz |
Fix for bug #8431 (FLOOR returns incorrect result)
mysql-test/r/type_newdecimal.result:
test result fixed
mysql-test/t/type_newdecimal.test:
test case enlarged for FLOOR and CEILING functions
sql/item_func.cc:
floor::int_op fixed - it should work differently depending on operand's type
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/type_newdecimal.result | 10 | ||||
-rw-r--r-- | mysql-test/t/type_newdecimal.test | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index 5b6612572cb..bb5f9e7f3b0 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -733,6 +733,9 @@ abs(9999999999999999999999) select abs(-9999999999999999999999); abs(-9999999999999999999999) 9999999999999999999999 +select ceiling(999999999999999999); +ceiling(999999999999999999) +999999999999999999 select ceiling(99999999999999999999); ceiling(99999999999999999999) 99999999999999999999 @@ -741,13 +744,16 @@ ceiling(9.9999999999999999999) 10 select ceiling(-9.9999999999999999999); ceiling(-9.9999999999999999999) --10 +-9 +select floor(999999999999999999); +floor(999999999999999999) +999999999999999999 select floor(9999999999999999999999); floor(9999999999999999999999) 9999999999999999999999 select floor(9.999999999999999999999); floor(9.999999999999999999999) -10 +9 select floor(-9.999999999999999999999); floor(-9.999999999999999999999) -10 diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test index 3922a0448e9..d116d56fa48 100644 --- a/mysql-test/t/type_newdecimal.test +++ b/mysql-test/t/type_newdecimal.test @@ -601,6 +601,7 @@ select abs(9999999999999999999999); select abs(-9999999999999999999999); #-- should return 9999999999999999999999 # +select ceiling(999999999999999999); select ceiling(99999999999999999999); #-- should return 99999999999999999999 # @@ -610,6 +611,7 @@ select ceiling(9.9999999999999999999); select ceiling(-9.9999999999999999999); #-- should return 9 # +select floor(999999999999999999); select floor(9999999999999999999999); #-- should return 9999999999999999999999 # |