summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_math.result
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@sun.com>2009-02-23 14:42:31 +0200
committerAlexey Kopytov <Alexey.Kopytov@sun.com>2009-02-23 14:42:31 +0200
commit8ae816240359d89554ffb2f5197666c71e45f1ba (patch)
tree8cbab18ef11dd6a2d9145bac3d88c64f57c3e062 /mysql-test/r/func_math.result
parent9fc083bd9ade238ed53f82978b5588f687b033c6 (diff)
parent0e62c9aa6301de71164496ec7c81c871d78ce8cd (diff)
downloadmariadb-git-8ae816240359d89554ffb2f5197666c71e45f1ba.tar.gz
Manual merge to 5.1.
Diffstat (limited to 'mysql-test/r/func_math.result')
-rw-r--r--mysql-test/r/func_math.result30
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result
index 74136816a95..c3d2db2d553 100644
--- a/mysql-test/r/func_math.result
+++ b/mysql-test/r/func_math.result
@@ -407,6 +407,36 @@ SELECT a DIV 2 FROM t1 UNION SELECT a DIV 2 FROM t1;
a DIV 2
0
DROP TABLE t1;
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES (-1.1), (1.1),
+(-1.5), (1.5),
+(-1.9), (1.9),
+(-2.1), (2.1),
+(-2.5), (2.5),
+(-2.9), (2.9),
+# Check numbers with absolute values > 2^53 - 1
+# (see comments for MAX_EXACT_INTEGER)
+(-1e16 - 0.5), (1e16 + 0.5),
+(-1e16 - 1.5), (1e16 + 1.5);
+SELECT a, ROUND(a) FROM t1;
+a ROUND(a)
+-1.1 -1
+1.1 1
+-1.5 -2
+1.5 2
+-1.9 -2
+1.9 2
+-2.1 -2
+2.1 2
+-2.5 -2
+2.5 2
+-2.9 -3
+2.9 3
+-1e+16 -10000000000000000
+1e+16 10000000000000000
+-1e+16 -10000000000000002
+1e+16 10000000000000002
+DROP TABLE t1;
End of 5.0 tests
SELECT 1e308 + 1e308;
1e308 + 1e308