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/r/insert.result | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'mysql-test/r/insert.result') diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index 0571d31fe57..36cfeec1b3a 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -500,23 +500,23 @@ Warnings: Warning 1265 Data truncated for column 'c' at row 1 SELECT * FROM t1; a b c -9.999999000000000748 10 10 +9.999999 10 10 1.225e-05 1.2e-05 1e-0 0.0001225 0.00012 NULL -0.122499999999999998 0.1225 NULL -0.122587699999999994 0.12259 NULL +0.1225 0.1225 NULL +0.1225877 0.12259 NULL 12.25 12.25 NULL 12.25 12.25 12.2 122500 122500 NULL 12250000000 1.2e+10 NULL -1225000000000000 1.2e+15 NULL +1.225e+15 1.2e+15 NULL 5000000 5000000 NULL 1.25e+78 1.2e+78 NULL 1.25e-94 1.2e-94 NULL 1.25e+203 1e+203 NULL 1.25e-175 1e-175 NULL -1.225000000000000089 NULL 1.23 -1.370000000000000107 NULL 1.37 +1.225 NULL 1.23 +1.37 NULL 1.37 -1.37 NULL -1.3 0.00187 NULL 0.00 -0.0187 NULL -0.0 @@ -554,23 +554,23 @@ INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0); INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0); SELECT * FROM t1; a b c -9.999999000000000748 10 9.999 +9.999999 10 9.999 1.225e-05 1.2e-05 1e-05 0.0001225 0.00012 NULL -0.122499999999999998 0.1225 NULL -0.122587699999999994 0.12259 NULL +0.1225 0.1225 NULL +0.1225877 0.12259 NULL 12.25 12.25 NULL 12.25 12.25 12.25 122500 122500 NULL 12250000000 1.2e+10 NULL -1225000000000000 1.2e+15 NULL +1.225e+15 1.2e+15 NULL 5000000 5000000 NULL 1.25e+78 1.2e+78 NULL 1.25e-94 1.2e-94 NULL 1.25e+203 1e+203 NULL 1.25e-175 1e-175 NULL -1.225000000000000089 NULL 1.225 -1.370000000000000107 NULL 1.37 +1.225 NULL 1.225 +1.37 NULL 1.37 -1.37 NULL -1.37 0.00187 NULL 0.002 -0.0187 NULL -0.01 -- cgit v1.2.1