From 1f22720c3f6bf28a44ee0e3a9a9abd52e9debe64 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 1 Dec 2007 15:25:24 +0300 Subject: 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. --- mysql-test/t/insert.test | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mysql-test/t/insert.test') 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; -- cgit v1.2.1