summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index e6a0ac086a8..65bcdc48c6a 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -3569,6 +3569,13 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
if (rli->mi->using_parallel())
{
int res= rli->parallel.do_event(serial_rgi, ev, event_size);
+ /*
+ In parallel replication, we need to update the relay log position
+ immediately so that it will be the correct position from which to
+ read the next event.
+ */
+ if (res == 0)
+ rli->event_relay_log_pos= rli->future_event_relay_log_pos;
if (res >= 0)
DBUG_RETURN(res);
/*