mariadb/mysql-test/suite/galera/r/MDEV-37056.result
Jan Lindström d3443c82f7 MDEV-37056 : SIGSEGV in wsrep_check_sequence | mysql_alter_table
Problem was that thd->lex->m_sql_cmd is not always set
especially when user has not provided ENGINE=xxx so
requesting option_storage_engine_name from there is not
safe.

Fixed by accessing thd->lex->m_sql_cmd only when user
has used ENGINE= and if not using ha_default_handlerton
and requesting engine name after it.
2025-10-27 14:11:50 +02:00

15 lines
535 B
Text

connection node_2;
connection node_1;
connection node_1;
SET SESSION wsrep_on=OFF;
SET default_storage_engine=MYISAM;
CREATE SEQUENCE t;
SET SESSION wsrep_on=ON;
CREATE INDEX idx ON t (a);
ERROR HY000: Sequence 'test.t' table structure is invalid (Sequence tables cannot have any keys)
DROP SEQUENCE t;
SET default_storage_engine='MYISAM';
CREATE SEQUENCE t INCREMENT BY 0 CACHE=0 ENGINE=InnoDB;
CREATE INDEX c ON t (c);
ERROR HY000: Sequence 'test.t' table structure is invalid (Sequence tables cannot have any keys)
DROP SEQUENCE t;