1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-20732 Correctly set the length of the FORMAT() result for float data type as argument.

This commit is contained in:
Gagan Goel
2019-12-30 15:11:01 -05:00
committed by Robert Bindar
parent 1c97cd339e
commit f0ca9bc669
6 changed files with 28 additions and 5 deletions

View File

@ -1733,6 +1733,13 @@ SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (f float);
INSERT INTO t1 VALUES (3e38), (-3e38), (0), (12.34), (-12.34);
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(f,0) FROM t1;
SELECT * FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
--echo #
--echo # End of 10.4 tests
--echo #