summaryrefslogtreecommitdiff
path: root/mysql-test/main/func_math.test
diff options
context:
space:
mode:
authorGagan Goel <gagan.nith@gmail.com>2019-12-30 15:11:01 -0500
committerRobert Bindar <robert@mariadb.org>2020-01-16 09:46:58 +0200
commitf0ca9bc669c742bab5a122e4caddb4b12a8c6c45 (patch)
tree2e5be8b0d229f26de4c7f03eb3e378b8eccab523 /mysql-test/main/func_math.test
parent1c97cd339e9513b152727f386573c8c048db0281 (diff)
downloadmariadb-git-f0ca9bc669c742bab5a122e4caddb4b12a8c6c45.tar.gz
MDEV-20732 Correctly set the length of the FORMAT() result for float data type as argument.
Diffstat (limited to 'mysql-test/main/func_math.test')
-rw-r--r--mysql-test/main/func_math.test7
1 files changed, 7 insertions, 0 deletions
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 #