mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-31655: Parallel replication deadlock victim preference code errorneously removed
Restore code to make InnoDB choose the second transaction as a deadlock victim if two transactions deadlock that need to commit in-order for parallel replication. This code was erroneously removed when VATS was implemented in InnoDB. Also add a test case for InnoDB choosing the right deadlock victim. Also fixes this bug, with testcase that reliably reproduces: MDEV-28776: rpl.rpl_mark_optimize_tbl_ddl fails with timeout on sync_with_master Note: This should be null-merged to 10.6, as a different fix is needed there due to InnoDB locking code changes. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
@@ -78,6 +78,7 @@
|
||||
#include "sql_audit.h"
|
||||
#include "sql_derived.h" // mysql_handle_derived
|
||||
#include "sql_prepare.h"
|
||||
#include "rpl_rli.h"
|
||||
#include <my_bit.h>
|
||||
|
||||
#include "debug_sync.h"
|
||||
@@ -1753,6 +1754,12 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
|
||||
save_read_set= table->read_set;
|
||||
save_write_set= table->write_set;
|
||||
|
||||
DBUG_EXECUTE_IF("rpl_write_record_small_sleep_gtid_100_200",
|
||||
{
|
||||
if (thd->rgi_slave && (thd->rgi_slave->current_gtid.seq_no == 100 ||
|
||||
thd->rgi_slave->current_gtid.seq_no == 200))
|
||||
my_sleep(20000);
|
||||
});
|
||||
if (info->handle_duplicates == DUP_REPLACE ||
|
||||
info->handle_duplicates == DUP_UPDATE)
|
||||
{
|
||||
|
Reference in New Issue
Block a user