mariadb/mysql-test/suite/galera/t/MDEV-37056.test
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

18 lines
No EOL
442 B
Text

--source include/galera_cluster.inc
--connection node_1
SET SESSION wsrep_on=OFF;
SET default_storage_engine=MYISAM;
CREATE SEQUENCE t;
SET SESSION wsrep_on=ON;
--error ER_SEQUENCE_INVALID_TABLE_STRUCTURE
CREATE INDEX idx ON t (a);
DROP SEQUENCE t;
SET default_storage_engine='MYISAM';
CREATE SEQUENCE t INCREMENT BY 0 CACHE=0 ENGINE=InnoDB;
--error ER_SEQUENCE_INVALID_TABLE_STRUCTURE
CREATE INDEX c ON t (c);
# cleanup
DROP SEQUENCE t;