summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorKristian Nielsen <knielsen@knielsen-hq.org>2016-11-15 13:10:21 +0100
committerKristian Nielsen <knielsen@knielsen-hq.org>2016-11-15 13:10:21 +0100
commitbccd0b5e0e2a118d31d5eedf2e363273157d7ca9 (patch)
treeab2eb52dadd6aa8747d67d5cb52d6d65eee4747c /sql
parentcf29e8c55b1f39234b5e38cee28f0241a23436fd (diff)
parent717f212840a35b2da228d0cc2877b8e1b32204a3 (diff)
downloadmariadb-git-bccd0b5e0e2a118d31d5eedf2e363273157d7ca9.tar.gz
Merge branch 'mdev10863' into 10.1
Diffstat (limited to 'sql')
-rw-r--r--sql/slave.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index fa82cf84b5f..79da2f3f6fc 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -4766,7 +4766,21 @@ pthread_handler_t handle_slave_sql(void *arg)
serial_rgi->gtid_sub_id= 0;
serial_rgi->gtid_pending= false;
- rli->gtid_skip_flag = GTID_SKIP_NOT;
+ if (mi->using_gtid != Master_info::USE_GTID_NO && mi->using_parallel() &&
+ rli->restart_gtid_pos.count() > 0)
+ {
+ /*
+ With parallel replication in GTID mode, if we have a multi-domain GTID
+ position, we need to start some way back in the relay log and skip any
+ GTID that was already applied before. Since event groups can be split
+ across multiple relay logs, this earlier starting point may be in the
+ middle of an already applied event group, so we also need to skip any
+ remaining part of such group.
+ */
+ rli->gtid_skip_flag = GTID_SKIP_TRANSACTION;
+ }
+ else
+ rli->gtid_skip_flag = GTID_SKIP_NOT;
if (init_relay_log_pos(rli,
rli->group_relay_log_name,
rli->group_relay_log_pos,