summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-10-08 00:48:42 +0300
committermonty@mysql.com <>2004-10-08 00:48:42 +0300
commitaa2327f95e73e1172e1cae5f4aeff7911db3d8cd (patch)
tree258f53f1d6d830a532f52c5ca046b370cdcd77c2 /mysql-test
parent8b1a6d377f861ea58daf141674a7f185761aa0db (diff)
downloadmariadb-git-aa2327f95e73e1172e1cae5f4aeff7911db3d8cd.tar.gz
Portability fix (Got different results for double -> longlong when compiling with full optimization)
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/t/strict.test9
1 files changed, 6 insertions, 3 deletions
diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test
index e03ad1ef537..23284974942 100644
--- a/mysql-test/t/strict.test
+++ b/mysql-test/t/strict.test
@@ -405,10 +405,13 @@ INSERT INTO t1 (col1) VALUES('9223372036854775808');
INSERT INTO t1 (col2) VALUES('-1');
--error 1264
INSERT INTO t1 (col2) VALUES('18446744073709551616');
+
+# Note that the following two double numbers are slighty bigger than max/min
+# bigint becasue of rounding errors when converting it to bigint
--error 1264
-INSERT INTO t1 (col1) VALUES(-9223372036854775809.0);
+INSERT INTO t1 (col1) VALUES(-9223372036854785809.0);
--error 1264
-INSERT INTO t1 (col1) VALUES(9223372036854775808.0);
+INSERT INTO t1 (col1) VALUES(9223372036854785808.0);
--error 1264
INSERT INTO t1 (col2) VALUES(-1.0);
--error 1264
@@ -432,7 +435,7 @@ INSERT IGNORE INTO t1 (col1) VALUES ('2a');
INSERT IGNORE INTO t1 values (1/0,1/0);
INSERT IGNORE INTO t1 VALUES(-9223372036854775809,-1),(9223372036854775808,18446744073709551616);
INSERT IGNORE INTO t1 VALUES('-9223372036854775809','-1'),('9223372036854775808','18446744073709551616');
-INSERT IGNORE INTO t1 VALUES(-9223372036854775809.0,-1.0),(9223372036854775808.0,18446744073709551616.0);
+INSERT IGNORE INTO t1 VALUES(-9223372036854785809.0,-1.0),(9223372036854785808.0,18446744073709551616.0);
UPDATE IGNORE t1 SET col2=1/NULL where col1=0;
SELECT * FROM t1;
DROP TABLE t1;