1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

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.
This commit is contained in:
unknown
2007-12-01 15:25:24 +03:00
parent d8d07eff70
commit 1f22720c3f
4 changed files with 18 additions and 14 deletions

View File

@@ -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;