diff options
author | unknown <knielsen@knielsen-hq.org> | 2013-06-28 15:19:30 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2013-06-28 15:19:30 +0200 |
commit | 1b3dc66e3117a09c95a00be2f649b975fdb25e2e (patch) | |
tree | db25dcfc0af5b9cccda27ee022dd8bd7acee0ce2 /sql/rpl_gtid.cc | |
parent | 7e5dc4f074b7d1cee4721e6fa49d6e5628ef793f (diff) | |
download | mariadb-git-1b3dc66e3117a09c95a00be2f649b975fdb25e2e.tar.gz |
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.
Diffstat (limited to 'sql/rpl_gtid.cc')
-rw-r--r-- | sql/rpl_gtid.cc | 9 |
1 files changed, 5 insertions, 4 deletions
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; } |