MDEV-11201: gtid_ignore_duplicates incorrectly ignores statements when GTID replication is not enabled
When master_use_gtid=no, the IO thread loads the slave GTID state from the master during connect. This races with the SQL thread when gtid_ignore_duplicates=1. If an event is in the relay log from before the new connect and has not been applied yet, moving the slave position causes the SQL thread to think that event should be skipped due to gtid_ignore_duplicates=1. This patch simply disables gtid_ignore_duplicates when not using GTID, which seems to be what one would expect.
This commit is contained in:
parent
7dd6efeaab
commit
88613e1df6
@ -1109,7 +1109,8 @@ handle_rpl_parallel_thread(void *arg)
|
||||
|
||||
thd->wait_for_commit_ptr= &rgi->commit_orderer;
|
||||
|
||||
if (opt_gtid_ignore_duplicates)
|
||||
if (opt_gtid_ignore_duplicates &&
|
||||
rgi->rli->mi->using_gtid != Master_info::USE_GTID_NO)
|
||||
{
|
||||
int res=
|
||||
rpl_global_gtid_slave_state->check_duplicate_gtid(&rgi->current_gtid,
|
||||
|
@ -3612,7 +3612,8 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
if (opt_gtid_ignore_duplicates)
|
||||
if (opt_gtid_ignore_duplicates &&
|
||||
rli->mi->using_gtid != Master_info::USE_GTID_NO)
|
||||
{
|
||||
int res= rpl_global_gtid_slave_state->check_duplicate_gtid
|
||||
(&serial_rgi->current_gtid, serial_rgi);
|
||||
|
Loading…
x
Reference in New Issue
Block a user