From f0ca9bc669c742bab5a122e4caddb4b12a8c6c45 Mon Sep 17 00:00:00 2001 From: Gagan Goel Date: Mon, 30 Dec 2019 15:11:01 -0500 Subject: MDEV-20732 Correctly set the length of the FORMAT() result for float data type as argument. --- mysql-test/main/func_math.test | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mysql-test/main/func_math.test') diff --git a/mysql-test/main/func_math.test b/mysql-test/main/func_math.test index 5f333c06b78..15c27076ba3 100644 --- a/mysql-test/main/func_math.test +++ b/mysql-test/main/func_math.test @@ -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 # -- cgit v1.2.1