diff options
author | unknown <knielsen@knielsen-hq.org> | 2013-03-21 11:03:31 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2013-03-21 11:03:31 +0100 |
commit | 9bb989a9d196755fe411551f27e6198ef6819159 (patch) | |
tree | e82bd52047fe6afe3291f111b3ff926f3b5299c0 /sql/rpl_mi.h | |
parent | 9d9ddad759a432967934baac596ef20d613214b3 (diff) | |
download | mariadb-git-9bb989a9d196755fe411551f27e6198ef6819159.tar.gz |
MDEV-26: Global transaction ID.
Fix MDEV-4275 - I/O thread restart duplicates events in the relay log.
The first time we connect to master after CHANGE MASTER or restart, we connect
from the GTID position. But then subsequent reconnects or IO thread restarts
reconnect with the old-style file/offset binlog pos from where it left off at
last disconnect. This is necessary to avoid duplicate events in the relay
logs, as there is nothing that synchronises the SQL thread update of GTID
state (multiple threads in case of multi-source) with IO thread reconnects.
Test cases.
Some small cleanups and fixes.
Diffstat (limited to 'sql/rpl_mi.h')
-rw-r--r-- | sql/rpl_mi.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/rpl_mi.h b/sql/rpl_mi.h index 61ee5227693..b6a3e7d91b9 100644 --- a/sql/rpl_mi.h +++ b/sql/rpl_mi.h @@ -126,8 +126,11 @@ class Master_info : public Slave_reporting_capability ulonglong received_heartbeats; // counter of received heartbeat events DYNAMIC_ARRAY ignore_server_ids; ulong master_id; - /* If last CHANGE MASTER was MASTER_GTID_POS=AUTO. */ - bool gtid_pos_auto; + /* + True if slave position is set using GTID state rather than old-style + file/offset binlog position. + */ + bool using_gtid; }; int init_master_info(Master_info* mi, const char* master_info_fname, const char* slave_info_fname, |