summaryrefslogtreecommitdiff
path: root/sql/rpl_parallel.cc
diff options
context:
space:
mode:
authorKristian Nielsen <knielsen@knielsen-hq.org>2016-12-01 09:59:58 +0100
committerKristian Nielsen <knielsen@knielsen-hq.org>2017-04-10 07:53:27 +0200
commit88613e1df69ab416d43f21551acec340648d0017 (patch)
tree706bad400ab32eee66cf6d36a52963bd8f012778 /sql/rpl_parallel.cc
parent7dd6efeaab688d703e3569c4f54f30502e88dd2f (diff)
downloadmariadb-git-88613e1df69ab416d43f21551acec340648d0017.tar.gz
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.
Diffstat (limited to 'sql/rpl_parallel.cc')
-rw-r--r--sql/rpl_parallel.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc
index e5964e9c038..43e52c00e8d 100644
--- a/sql/rpl_parallel.cc
+++ b/sql/rpl_parallel.cc
@@ -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,