summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnel Husakovic <anel@mariadb.org>2020-10-27 12:16:53 +0100
committerAnel Husakovic <anel@mariadb.org>2020-10-27 15:17:54 +0100
commite183aec1d75ea7b424ebe237e6b1643961903f2d (patch)
tree260696cf9cb4c4d3a5bd24f8ca62b507778eaac2
parente64084d5a3a72462fa6263d1d0a86e72c0ba0d47 (diff)
downloadmariadb-git-e183aec1d75ea7b424ebe237e6b1643961903f2d.tar.gz
MDEV-24018: SIGSEGV in Item_func_nextval::update_table on SELECT SETVAL
Reviewed-by: wlad@mariadb.com
-rw-r--r--mysql-test/suite/sql_sequence/next.result5
-rw-r--r--mysql-test/suite/sql_sequence/next.test7
2 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/suite/sql_sequence/next.result b/mysql-test/suite/sql_sequence/next.result
index fe761baa032..76991fbe68c 100644
--- a/mysql-test/suite/sql_sequence/next.result
+++ b/mysql-test/suite/sql_sequence/next.result
@@ -541,5 +541,10 @@ CREATE VIEW v AS SELECT 1;
LOCK TABLE v READ;
SELECT NEXT VALUE FOR v;
ERROR 42S02: 'test.v' is not a SEQUENCE
+#
+# MDEV-24018: SIGSEGV in Item_func_nextval::update_table on SELECT SETVAL
+#
+SELECT SETVAL (v,0);
+ERROR 42S02: 'test.v' is not a SEQUENCE
UNLOCK TABLES;
DROP VIEW v;
diff --git a/mysql-test/suite/sql_sequence/next.test b/mysql-test/suite/sql_sequence/next.test
index 5eac3b668ba..9f0eebdf774 100644
--- a/mysql-test/suite/sql_sequence/next.test
+++ b/mysql-test/suite/sql_sequence/next.test
@@ -288,5 +288,12 @@ CREATE VIEW v AS SELECT 1;
LOCK TABLE v READ;
--error ER_NOT_SEQUENCE
SELECT NEXT VALUE FOR v;
+
+--echo #
+--echo # MDEV-24018: SIGSEGV in Item_func_nextval::update_table on SELECT SETVAL
+--echo #
+--error ER_NOT_SEQUENCE
+SELECT SETVAL (v,0);
+
UNLOCK TABLES;
DROP VIEW v;