summaryrefslogtreecommitdiff
path: root/sql/rpl_gtid.h
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-03-18 15:09:36 +0100
committerunknown <knielsen@knielsen-hq.org>2013-03-18 15:09:36 +0100
commit9d9ddad759a432967934baac596ef20d613214b3 (patch)
treec0068bca3c56d1806265e50b7fed442dbf70e84a /sql/rpl_gtid.h
parent379819d8c06ee086e9a3f5cf7e6c225fdb626596 (diff)
downloadmariadb-git-9d9ddad759a432967934baac596ef20d613214b3.tar.gz
MDEV-26: Global transaction ID.
Fix things so that a master can switch with MASTER_GTID_POS=AUTO to a slave that was previously running with log_slave_updates=0, by looking into the slave replication state on the master when the slave requests something not present in the binlog. Be a bit more strict about what position the slave can ask for, to avoid some easy-to-hit misconfiguration errors. Start over with seq_no counter when RESET MASTER.
Diffstat (limited to 'sql/rpl_gtid.h')
-rw-r--r--sql/rpl_gtid.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/rpl_gtid.h b/sql/rpl_gtid.h
index 003db657242..bdc88b5c2b5 100644
--- a/sql/rpl_gtid.h
+++ b/sql/rpl_gtid.h
@@ -89,6 +89,7 @@ struct rpl_slave_state
bool in_transaction);
uint64 next_subid(uint32 domain_id);
int tostring(String *dest, rpl_gtid *extra_gtids, uint32 num_extra);
+ bool domain_to_gtid(uint32 domain_id, rpl_gtid *out_gtid);
int load(THD *thd, char *state_from_master, size_t len, bool reset);
bool is_empty();
@@ -135,12 +136,13 @@ struct rpl_binlog_state
void reset();
int update(const struct rpl_gtid *gtid);
- uint32 seq_no_from_state();
+ uint64 seq_no_from_state();
int write_to_iocache(IO_CACHE *dest);
int read_from_iocache(IO_CACHE *src);
uint32 count();
int get_gtid_list(rpl_gtid *gtid_list, uint32 list_size);
int get_most_recent_gtid_list(rpl_gtid **list, uint32 *size);
+ rpl_gtid *find(uint32 domain_id, uint32 server_id);
};