From 1b3dc66e3117a09c95a00be2f649b975fdb25e2e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Jun 2013 15:19:30 +0200 Subject: MDEV-4506: Parallel replication: Intermediate commit. First step of splitting out part of Relay_log_info, so that different event groups being applied in parallel can each use their own copy. --- sql/rpl_gtid.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sql/rpl_gtid.cc') diff --git a/sql/rpl_gtid.cc b/sql/rpl_gtid.cc index 71b18e64842..54d3b704a2c 100644 --- a/sql/rpl_gtid.cc +++ b/sql/rpl_gtid.cc @@ -65,17 +65,18 @@ int rpl_slave_state::record_and_update_gtid(THD *thd, Relay_log_info *rli) { uint64 sub_id; + struct rpl_group_info *rgi; /* Update the GTID position, if we have it and did not already update it in a GTID transaction. */ - if ((sub_id= rli->gtid_sub_id)) + if ((rgi= rli->group_info) && (sub_id= rgi->gtid_sub_id)) { - rli->gtid_sub_id= 0; - if (record_gtid(thd, &rli->current_gtid, sub_id, false, false)) + rgi->gtid_sub_id= 0; + if (record_gtid(thd, &rgi->current_gtid, sub_id, false, false)) return 1; - update_state_hash(sub_id, &rli->current_gtid); + update_state_hash(sub_id, &rgi->current_gtid); } return 0; } -- cgit v1.2.1