mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-27365 CREATE-or-REPLACE SEQUENCE is binlogged without DDL flag
CREATE-OR-REPLACE SEQUENCE is not logged with Gtid event DDL flag which affects its slave parallel execution. Unlike other DDL:s it can occur in concurrent execution with following transactions which can lead to various errors, including asserts like (mdl_request->type != MDL_INTENTION_EXCLUSIVE && mdl_request->type != MDL_EXCLUSIVE) || !(get_thd()->rgi_slave && get_thd()->rgi_slave->is_parallel_exec && lock->check_if_conflicting_replication_locks(this) in MDL_context::acquire_lock. Fixed to wrap internal statement level commit with save- and-restore of TRANS_THD::m_unsafe_rollback_flags.
This commit is contained in:
@ -0,0 +1,30 @@
|
||||
# Check binlog properties of various DDL:s.
|
||||
# Motivated by MDEV-27365.
|
||||
#
|
||||
--source include/have_log_bin.inc
|
||||
--source include/have_binlog_format_mixed.inc
|
||||
|
||||
RESET MASTER;
|
||||
|
||||
# MDEV-27365 CREATE-or-REPLACE SEQUENCE bilogged without DDL flag
|
||||
# Prove it is logged with the DDL flag.
|
||||
CREATE OR REPLACE SEQUENCE s1;
|
||||
|
||||
# This one has been always correct.
|
||||
DROP SEQUENCE s1;
|
||||
FLUSH LOGS;
|
||||
|
||||
--let $MYSQLD_DATADIR= `select @@datadir`
|
||||
--exec $MYSQL_BINLOG --base64-output=decode-rows $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
|
||||
|
||||
--let SEARCH_PATTERN= GTID [0-9]+-[0-9]+-[0-9]+
|
||||
--let SEARCH_FILE= $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--echo The same as above number of samples must be found:
|
||||
--let SEARCH_PATTERN= GTID [0-9]+-[0-9]+-[0-9]+ ddl
|
||||
--let SEARCH_FILE= $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
|
||||
--source include/search_pattern_in_file.inc
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
|
||||
|
||||
--echo End of the tests
|
Reference in New Issue
Block a user