diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2015-12-10 16:17:20 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2015-12-10 16:18:15 +0100 |
commit | 537c750e328cd080365e465acd4f0383bf0febf3 (patch) | |
tree | 583a096c5bf18d0b1285f1e87cba9406e71a0b46 /mysql-test/r/dyncol.result | |
parent | 311f0308d04f3a55ad18470ca39e9d44479c4782 (diff) | |
download | mariadb-git-537c750e328cd080365e465acd4f0383bf0febf3.tar.gz |
MDEV-8521 Drastic loss of precision in COLUMN_JSON() on DOUBLEs
fixed conversion
Diffstat (limited to 'mysql-test/r/dyncol.result')
-rw-r--r-- | mysql-test/r/dyncol.result | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/mysql-test/r/dyncol.result b/mysql-test/r/dyncol.result index fe66e8ac91f..af7c3b7337c 100644 --- a/mysql-test/r/dyncol.result +++ b/mysql-test/r/dyncol.result @@ -1693,10 +1693,10 @@ ERROR 22007: Illegal value used as argument of dynamic column function # select column_json(column_create("int", -1212 as int, "uint", 12334 as unsigned int, "decimal", "23.344" as decimal, "double", 1.23444e50 as double, "string", 'gdgd\\dhdjh"dhdhd' as char, "time", "0:45:49.000001" AS time, "datetime", "2011-04-05 0:45:49.000001" AS datetime, "date", "2011-04-05" AS date)); column_json(column_create("int", -1212 as int, "uint", 12334 as unsigned int, "decimal", "23.344" as decimal, "double", 1.23444e50 as double, "string", 'gdgd\\dhdjh"dhdhd' as char, "time", "0:45:49.000001" AS time, "datetime", "2011-04-05 0:45:49.000001" -{"int":-1212,"date":"2011-04-05","time":"00:45:49.000001","uint":12334,"double":1.2e50,"string":"gdgd\\dhdjh\"dhdhd","decimal":23.344,"datetime":"2011-04-05 00:45:49.000001"} +{"int":-1212,"date":"2011-04-05","time":"00:45:49.000001","uint":12334,"double":1.23444e50,"string":"gdgd\\dhdjh\"dhdhd","decimal":23.344,"datetime":"2011-04-05 00:45:49.000001"} select column_json(column_create(1, -1212 as int, 2, 12334 as unsigned int, 3, "23.344" as decimal, 4, 1.23444e50 as double, 5, 'gdgd\\dhdjh"dhdhd' as char, 6, "0:45:49.000001" AS time, 7, "2011-04-05 0:45:49.000001" AS datetime, 8, "2011-04-05" AS date)); column_json(column_create(1, -1212 as int, 2, 12334 as unsigned int, 3, "23.344" as decimal, 4, 1.23444e50 as double, 5, 'gdgd\\dhdjh"dhdhd' as char, 6, "0:45:49.000001" AS time, 7, "2011-04-05 0:45:49.000001" AS datetime, 8, "2011-04-05" AS date)) -{"1":-1212,"2":12334,"3":23.344,"4":1.2e50,"5":"gdgd\\dhdjh\"dhdhd","6":"00:45:49.000001","7":"2011-04-05 00:45:49.000001","8":"2011-04-05"} +{"1":-1212,"2":12334,"3":23.344,"4":1.23444e50,"5":"gdgd\\dhdjh\"dhdhd","6":"00:45:49.000001","7":"2011-04-05 00:45:49.000001","8":"2011-04-05"} # # CHECK test # @@ -1834,7 +1834,19 @@ COLUMN_CREATE( 'two', 123.456 as DOUBLE ) ) -{"one":123.456,"two":123.46} +{"one":123.456,"two":123.456} +# +# MDEV-8521: Drastic loss of precision in COLUMN_JSON() on DOUBLEs +# +select column_get(column_create('float', 1.23456789012345E+100 as double), 'float' as double); +column_get(column_create('float', 1.23456789012345E+100 as double), 'float' as double) +1.23456789012345e100 +select column_json(column_create('float', 1.23456789012345E+100 as double)); +column_json(column_create('float', 1.23456789012345E+100 as double)) +{"float":1.23456789012345e100} +select column_json(column_create('float', 1.23456789012345E+10 as double)); +column_json(column_create('float', 1.23456789012345E+10 as double)) +{"float":12345678901.2345} # # end of 10.0 tests # |