summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_math.result
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2011-07-18 11:21:14 +0200
committerTor Didriksen <tor.didriksen@oracle.com>2011-07-18 11:21:14 +0200
commitb9a929082b72bbcec929e97999a81be3f2700805 (patch)
tree28b394c9742e4dced4c6b2c8a429478342e430c4 /mysql-test/r/func_math.result
parent7fddcd06d20fdcbe5bb67d6adcd848ff3830ceef (diff)
downloadmariadb-git-b9a929082b72bbcec929e97999a81be3f2700805.tar.gz
Bug#12711164 - 61676: RESULT OF DIV WITH DECIMAL AND INTEGER DOES NOT MAKE SENSE
Truncate result of decimal division before converting to integer.
Diffstat (limited to 'mysql-test/r/func_math.result')
-rw-r--r--mysql-test/r/func_math.result19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result
index 0be170c2f26..8d4a4171e21 100644
--- a/mysql-test/r/func_math.result
+++ b/mysql-test/r/func_math.result
@@ -709,3 +709,22 @@ foo
select 999999999999999999999999999999999999999999999999999999999999999999999999999999999 % 0.0 as foo;
foo
NULL
+#
+# Bug#12711164 - 61676:
+# RESULT OF DIV WITH DECIMAL AND INTEGER DOES NOT MAKE SENSE
+#
+select 5 div 2;
+5 div 2
+2
+select 5.0 div 2.0;
+5.0 div 2.0
+2
+select 5.0 div 2;
+5.0 div 2
+2
+select 5 div 2.0;
+5 div 2.0
+2
+select 5.9 div 2, 1.23456789e3 DIV 2, 1.23456789e9 DIV 2, 1.23456789e19 DIV 2;
+5.9 div 2 1.23456789e3 DIV 2 1.23456789e9 DIV 2 1.23456789e19 DIV 2
+2 617 617283945 6172839450000000000