summaryrefslogtreecommitdiff
path: root/mysql-test/t/insert.test
diff options
context:
space:
mode:
authorunknown <kaa@polly.(none)>2007-12-01 15:25:24 +0300
committerunknown <kaa@polly.(none)>2007-12-01 15:25:24 +0300
commit1f22720c3f6bf28a44ee0e3a9a9abd52e9debe64 (patch)
treeef0425d76948e8696f54c69d42e7d37d7a11c274 /mysql-test/t/insert.test
parentd8d07eff702b303b9458ac5622bdc42e5a0c1f93 (diff)
downloadmariadb-git-1f22720c3f6bf28a44ee0e3a9a9abd52e9debe64.tar.gz
Fixed the floating point number tests on Windows.
mysql-test/r/insert.result: Fixed the test cases. mysql-test/t/cast.test: We need to do replace_result because warnings are printed by another procedure. mysql-test/t/insert.test: Windows implements a different rounding rules in printf("%g"), thus we still need to do replace_result. sql/field.cc: Limit the precision to avoid garbage past the significant digits.
Diffstat (limited to 'mysql-test/t/insert.test')
-rw-r--r--mysql-test/t/insert.test4
1 files changed, 3 insertions, 1 deletions
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test
index cf67935768a..3c150d0c3f6 100644
--- a/mysql-test/t/insert.test
+++ b/mysql-test/t/insert.test
@@ -386,7 +386,9 @@ INSERT INTO t1(a,c) VALUES (1.87e-3, 1.87e-3);
INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2);
INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0);
INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0);
-
+# Expected results are "12.2" and "1.2e+78", but Windows returns "12.3" and
+# "1.3e+78" due to different rounding rules
+--replace_result 12.3 12.2 1.3e+78 1.2e+78
SELECT * FROM t1;
DROP TABLE t1;