summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2017-12-08 14:40:27 +0400
committerAlexander Barkov <bar@mariadb.org>2017-12-08 14:40:27 +0400
commit20089f5a39fa8f6f08113f12ed87c34e844c4fc6 (patch)
treedddecc6d443acd90e265b57c132cb5eb011b5767 /mysql-test
parentac61a575dfff6b9510576be920a522c710732c0d (diff)
downloadmariadb-git-20089f5a39fa8f6f08113f12ed87c34e844c4fc6.tar.gz
MDEV-14596 Crash in INTERVAL(ROW(..),ROW(..))
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_set.result9
-rw-r--r--mysql-test/t/func_set.test11
2 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/func_set.result b/mysql-test/r/func_set.result
index 9c4976d46db..ca1ccd71c90 100644
--- a/mysql-test/r/func_set.result
+++ b/mysql-test/r/func_set.result
@@ -220,3 +220,12 @@ NULL
1,2,3,4,5,6,7
DROP TABLE t1;
+#
+# MDEV-14596 Crash in INTERVAL(ROW(..),ROW(..))
+#
+SELECT INTERVAL(ROW(1,1),ROW(1,2));
+ERROR 21000: Operand should contain 1 column(s)
+SELECT INTERVAL(1,ROW(1,2));
+ERROR 21000: Operand should contain 1 column(s)
+SELECT INTERVAL(ROW(1,2),1);
+ERROR 21000: Operand should contain 1 column(s)
diff --git a/mysql-test/t/func_set.test b/mysql-test/t/func_set.test
index ba984113fd7..887b1948498 100644
--- a/mysql-test/t/func_set.test
+++ b/mysql-test/t/func_set.test
@@ -136,3 +136,14 @@ SELECT * FROM t1 WHERE FIND_IN_SET(NULL, NULL) IS UNKNOWN;
--echo
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-14596 Crash in INTERVAL(ROW(..),ROW(..))
+--echo #
+
+--error ER_OPERAND_COLUMNS
+SELECT INTERVAL(ROW(1,1),ROW(1,2));
+--error ER_OPERAND_COLUMNS
+SELECT INTERVAL(1,ROW(1,2));
+--error ER_OPERAND_COLUMNS
+SELECT INTERVAL(ROW(1,2),1);