From 12f364ece7663663cabdc29f106ca69af63fe4e7 Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Tue, 22 Dec 2009 19:23:13 +0300 Subject: Backport of WL #2934: Make/find library for doing float/double to string conversions and vice versa" Initial import of the dtoa.c code and custom wrappers around it to allow its usage from the server code. Conversion of FLOAT/DOUBLE values to DECIMAL ones or strings and vice versa has been significantly reworked. As the new algoritms are more precise than the older ones, results of such conversions may not always match those obtained from older server versions. This in turn may break compatibility for some applications. This patch also fixes the following bugs: - bug #12860 "Difference in zero padding of exponent between Unix and Windows" - bug #21497 "DOUBLE truncated to unusable value" - bug #26788 "mysqld (debug) aborts when inserting specific numbers into char fields" - bug #24541 "Data truncated..." on decimal type columns without any good reason" --- mysql-test/r/strict.result | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mysql-test/r/strict.result') diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 897c9072203..bdb7576f95e 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -873,14 +873,14 @@ Warning 1264 Out of range value for column 'col2' at row 1 SELECT * FROM t1; col1 col2 -1.1e-37 0 -3.4e+38 3.4e+38 +3.4e38 3.4e38 -1.1e-37 0 -3.4e+38 3.4e+38 +3.4e38 3.4e38 0 NULL 2 NULL NULL NULL -3.40282e+38 0 -3.40282e+38 0 +3.40282e38 0 +3.40282e38 0 DROP TABLE t1; CREATE TABLE t1 (col1 DOUBLE PRECISION, col2 DOUBLE PRECISION UNSIGNED); INSERT INTO t1 VALUES (-2.2E-307,0),(2E-307,0),(+1.7E+308,+1.7E+308); @@ -922,14 +922,14 @@ SELECT * FROM t1; col1 col2 -2.2e-307 0 1e-303 0 -NULL 1.7e+308 +NULL 1.7e308 -2.2e-307 0 -2e-307 0 -NULL 1.7e+308 +NULL 1.7e308 0 NULL 2 NULL NULL NULL -1.79769313486232e+308 0 +1.7976931348623157e308 0 DROP TABLE t1; CREATE TABLE t1 (col1 CHAR(5), col2 VARCHAR(6)); INSERT INTO t1 VALUES ('hello', 'hello'),('he', 'he'),('hello ', 'hello '); -- cgit v1.2.1