diff --git a/mysql-test/suite/galera/r/galera_sequences.result b/mysql-test/suite/galera/r/galera_sequences.result index 1a5219c2d45..1f6b2bd6637 100644 --- a/mysql-test/suite/galera/r/galera_sequences.result +++ b/mysql-test/suite/galera/r/galera_sequences.result @@ -314,3 +314,14 @@ NEXTVAL(t) connection node_1; DROP TABLE t1; DROP SEQUENCE t; + +MDEV-33245 SIGSEGV in wsrep_check_sequence | Sql_cmd_alter_sequence::execute + +CREATE TABLE t (a INT) ENGINE=InnoDB; +INSERT INTO t VALUES (0); +CREATE TABLE t1 (c VARCHAR) ENGINE=InnoDB; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ENGINE=InnoDB' at line 1 +ALTER SEQUENCE IF EXISTS t MINVALUE=1; +ERROR 42000: This version of MariaDB doesn't yet support 'CACHE without INCREMENT BY 0 in Galera cluster' +DROP TABLE t; +End of 10.5 tests diff --git a/mysql-test/suite/galera/t/galera_sequences.test b/mysql-test/suite/galera/t/galera_sequences.test index 53417055d7d..75a31b224b9 100644 --- a/mysql-test/suite/galera/t/galera_sequences.test +++ b/mysql-test/suite/galera/t/galera_sequences.test @@ -341,3 +341,18 @@ SELECT NEXTVAL(t); --connection node_1 DROP TABLE t1; DROP SEQUENCE t; + +--echo +--echo MDEV-33245 SIGSEGV in wsrep_check_sequence | Sql_cmd_alter_sequence::execute +--echo + +CREATE TABLE t (a INT) ENGINE=InnoDB; +INSERT INTO t VALUES (0); + +--error ER_PARSE_ERROR +CREATE TABLE t1 (c VARCHAR) ENGINE=InnoDB; +--error ER_NOT_SUPPORTED_YET +ALTER SEQUENCE IF EXISTS t MINVALUE=1; + +DROP TABLE t; +--echo End of 10.5 tests diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 9aab9f97fe0..7c2060d0b9d 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -7472,6 +7472,7 @@ alter: { LEX *lex= Lex; lex->sql_command= SQLCOM_ALTER_SEQUENCE; + lex->create_info.init(); DBUG_ASSERT(!lex->m_sql_cmd); if (Lex->main_select_push()) MYSQL_YYABORT;