mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-8725: Assertion `!(thd->rgi_slave && thd-> rgi_slave->did_mark_start_commit)' failed in ha_rollback_trans
The assertion is there to catch cases where we rollback while mark_start_commit() is active. This can allow following event groups to be replicated too early, causing conflicts. But in this case, we have an _explicit_ ROLLBACK event in the binlog, which should not assert. We fix this by delaying the mark_start_commit() in the explicit ROLLBACK case. It seems safest to delay this in ROLLBACK case anyway, and there should be no reason to try to optimise this corner case.
This commit is contained in:
@@ -2369,6 +2369,28 @@ SET GLOBAL debug_dbug=@old_dbug;
|
||||
|
||||
|
||||
|
||||
--echo *** MDEV-8725: Assertion on ROLLBACK statement in the binary log ***
|
||||
--connection server_1
|
||||
# Inject an event group terminated by ROLLBACK, by mixing MyISAM and InnoDB
|
||||
# in a transaction. The bug was an assertion on the ROLLBACK due to
|
||||
# mark_start_commit() being already called.
|
||||
--disable_warnings
|
||||
BEGIN;
|
||||
INSERT INTO t2 VALUES (200);
|
||||
INSERT INTO t1 VALUES (200);
|
||||
INSERT INTO t2 VALUES (201);
|
||||
ROLLBACK;
|
||||
--enable_warnings
|
||||
SELECT * FROM t1 WHERE a>=200 ORDER BY a;
|
||||
SELECT * FROM t2 WHERE a>=200 ORDER BY a;
|
||||
--source include/save_master_gtid.inc
|
||||
|
||||
--connection server_2
|
||||
--source include/sync_with_master_gtid.inc
|
||||
SELECT * FROM t1 WHERE a>=200 ORDER BY a;
|
||||
SELECT * FROM t2 WHERE a>=200 ORDER BY a;
|
||||
|
||||
|
||||
# Clean up.
|
||||
--connection server_2
|
||||
--source include/stop_slave.inc
|
||||
|
||||
Reference in New Issue
Block a user