summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sql_sequence
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-02-14 17:06:24 +0200
committerMonty <monty@mariadb.org>2018-02-15 10:18:55 +0200
commit7bd81c726b941e2cc3a0aa1d2eaa22419a4d2979 (patch)
tree01dcc4b879bd3351d84d4d01241244c75ec05d5d /mysql-test/suite/sql_sequence
parentc17a06abf8f7418091b87abd5e1fa7c6522c7591 (diff)
downloadmariadb-git-7bd81c726b941e2cc3a0aa1d2eaa22419a4d2979.tar.gz
Crash when giving error message for ALTER SEQUENCE
Fixes MDEV-14761 "Assertion `!mysql_parse_status || thd->is_error() || thd->get_internal_handler()' failed in parse_sql"
Diffstat (limited to 'mysql-test/suite/sql_sequence')
-rw-r--r--mysql-test/suite/sql_sequence/other.result9
-rw-r--r--mysql-test/suite/sql_sequence/other.test11
2 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/suite/sql_sequence/other.result b/mysql-test/suite/sql_sequence/other.result
index 90e3a0737c6..7a81b7f4729 100644
--- a/mysql-test/suite/sql_sequence/other.result
+++ b/mysql-test/suite/sql_sequence/other.result
@@ -162,3 +162,12 @@ select next value for s1;
ERROR HY000: Can't execute the query because you have a conflicting read lock
unlock tables;
drop sequence s1;
+#
+# MDEV-14761
+# Assertion `!mysql_parse_status || thd->is_error() ||
+# thd->get_internal_handler()' failed in parse_sql
+#
+CREATE SEQUENCE s1;
+ALTER SEQUENCE s1 MAXVALUE 100 NO MAXVALUE;
+ERROR HY000: Option 'MAXVALUE' used twice in statement
+DROP SEQUENCE s1;
diff --git a/mysql-test/suite/sql_sequence/other.test b/mysql-test/suite/sql_sequence/other.test
index d816ec7c108..8e62479d86a 100644
--- a/mysql-test/suite/sql_sequence/other.test
+++ b/mysql-test/suite/sql_sequence/other.test
@@ -131,3 +131,14 @@ create sequence s2;
select next value for s1;
unlock tables;
drop sequence s1;
+
+--echo #
+--echo # MDEV-14761
+--echo # Assertion `!mysql_parse_status || thd->is_error() ||
+--echo # thd->get_internal_handler()' failed in parse_sql
+--echo #
+
+CREATE SEQUENCE s1;
+--error ER_DUP_ARGUMENT
+ALTER SEQUENCE s1 MAXVALUE 100 NO MAXVALUE;
+DROP SEQUENCE s1;