summaryrefslogtreecommitdiff
path: root/mysql-test/r/cast.result
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2009-12-22 19:23:13 +0300
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2009-12-22 19:23:13 +0300
commit12f364ece7663663cabdc29f106ca69af63fe4e7 (patch)
tree40437c602d2a9ddaa03a54742cec4884f0974253 /mysql-test/r/cast.result
parentd4f23f0cf6db38731a161c5c7b0b056fc67e5c02 (diff)
downloadmariadb-git-12f364ece7663663cabdc29f106ca69af63fe4e7.tar.gz
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"
Diffstat (limited to 'mysql-test/r/cast.result')
-rw-r--r--mysql-test/r/cast.result10
1 files changed, 5 insertions, 5 deletions
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result
index c53de220b60..3e1ea824db5 100644
--- a/mysql-test/r/cast.result
+++ b/mysql-test/r/cast.result
@@ -342,11 +342,11 @@ INSERT INTO t1 SET f1 = -1.0e+30 ;
INSERT INTO t1 SET f1 = +1.0e+30 ;
SELECT f1 AS double_val, CAST(f1 AS SIGNED INT) AS cast_val FROM t1;
double_val cast_val
--1e+30 -9223372036854775808
-1e+30 9223372036854775807
+-1e30 -9223372036854775808
+1e30 9223372036854775807
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1e+30'
-Warning 1292 Truncated incorrect INTEGER value: '1e+30'
+Warning 1292 Truncated incorrect INTEGER value: '-1e30'
+Warning 1292 Truncated incorrect INTEGER value: '1e30'
DROP TABLE t1;
select isnull(date(NULL)), isnull(cast(NULL as DATE));
isnull(date(NULL)) isnull(cast(NULL as DATE))
@@ -363,7 +363,7 @@ cast('1.2' as decimal(3,2))
1.20
select 1e18 * cast('1.2' as decimal(3,2));
1e18 * cast('1.2' as decimal(3,2))
-1.2e+18
+1.2e18
select cast(cast('1.2' as decimal(3,2)) as signed);
cast(cast('1.2' as decimal(3,2)) as signed)
1