diff options
author | unknown <monty@mysql.com> | 2004-10-08 00:48:42 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-10-08 00:48:42 +0300 |
commit | 1262be26f93ea3e528c6ba39911cac131f60b130 (patch) | |
tree | 258f53f1d6d830a532f52c5ca046b370cdcd77c2 /mysql-test/t/strict.test | |
parent | 437855378fd67d9a4d06fd6df8c74fbfc3e29282 (diff) | |
download | mariadb-git-1262be26f93ea3e528c6ba39911cac131f60b130.tar.gz |
Portability fix (Got different results for double -> longlong when compiling with full optimization)
Diffstat (limited to 'mysql-test/t/strict.test')
-rw-r--r-- | mysql-test/t/strict.test | 9 |
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; |