diff options
author | unknown <knielsen@knielsen-hq.org> | 2013-02-15 17:06:01 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2013-02-15 17:06:01 +0100 |
commit | bfa3f15416c5e5237871cc8e16ca539de27ed315 (patch) | |
tree | bc2ae5d21b8f550e89415ee022f223b0bc0b7c08 /sql/slave.cc | |
parent | 1c6271b36a8a8b85e5af87915fc5d680e2c10575 (diff) | |
download | mariadb-git-bfa3f15416c5e5237871cc8e16ca539de27ed315.tar.gz |
MDEV-26: Global Transaction ID.
Fix things so that GTID state on slave is updated also for
non-XID event groups (ie. DDL and MyISAM DML).
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 33455986008..3c98ecf3639 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -5151,8 +5151,25 @@ MYSQL *rpl_connect_master(MYSQL *mysql) bool flush_relay_log_info(Relay_log_info* rli) { bool error=0; + uint64 sub_id; + rpl_gtid gtid; DBUG_ENTER("flush_relay_log_info"); + /* + 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)) + { + rli->gtid_sub_id= 0; + gtid= rli->current_gtid; + if (rpl_global_gtid_slave_state.record_gtid(rli->sql_thd, + >id, sub_id, false)) + error= 1; + else + update_slave_gtid_state_hash(sub_id, >id); + } + if (unlikely(rli->no_storage)) DBUG_RETURN(0); |