summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_math.test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2020-05-14 11:57:47 +0400
committerAlexander Barkov <bar@mariadb.com>2020-05-14 11:57:47 +0400
commit4dc690dc28d69abcc2be683819d8ab0798df0c9e (patch)
treec1ad9b3302f40092983769d33608c064c1449566 /mysql-test/t/func_math.test
parentf827ba3b842d4bd18be37d4b983665b5840251bf (diff)
parent31f34b20f3295db7e99877dcfe61b5798a6cfe95 (diff)
downloadmariadb-git-4dc690dc28d69abcc2be683819d8ab0798df0c9e.tar.gz
Merge remote-tracking branch 'origin/10.1' into 10.2
Diffstat (limited to 'mysql-test/t/func_math.test')
-rw-r--r--mysql-test/t/func_math.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test
index 127cbb574f8..077cfdc5b6d 100644
--- a/mysql-test/t/func_math.test
+++ b/mysql-test/t/func_math.test
@@ -715,6 +715,18 @@ SELECT 9223372036854775808 MOD -9223372036854775808;
SELECT -9223372036854775808 MOD 9223372036854775808;
SELECT -9223372036854775808 MOD -9223372036854775808;
+--echo #
+--echo # MDEV-22502 MDB crashes in CREATE TABLE AS SELECT when the precision of returning type = 0
+--echo #
+
+CREATE TABLE t1 (d decimal(5,5));
+INSERT INTO t1 VALUES (0.55555);
+SELECT TRUNCATE(d,0) FROM t1;
+CREATE TABLE t2 AS SELECT TRUNCATE(d,0) FROM t1;
+SELECT * FROM t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t1, t2;
+
--echo #
--echo # MDEV-22503 MDB limits DECIMAL column precision to 16 doing CTAS with floor/ceil over DECIMAL(X,Y) where X > 16