1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +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:
Andrei
2021-12-26 18:13:49 +02:00
committed by Andrei Elkin
parent 5fd5e9fff3
commit 80da35a326
3 changed files with 46 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
RESET MASTER;
CREATE OR REPLACE SEQUENCE s1;
DROP SEQUENCE s1;
FLUSH LOGS;
FOUND 2 /GTID [0-9]+-[0-9]+-[0-9]+/ in mysqlbinlog.sql
The same as above number of samples must be found:
FOUND 2 /GTID [0-9]+-[0-9]+-[0-9]+ ddl/ in mysqlbinlog.sql
End of the tests