summaryrefslogtreecommitdiff
path: root/sql/rpl_gtid.h
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-05-22 17:36:48 +0200
committerunknown <knielsen@knielsen-hq.org>2013-05-22 17:36:48 +0200
commit1cd6eb5f942ca3e94e86a48512d992fbb3aeecd9 (patch)
treea23bba541fbfbc0fc92f9666d29340320b9be428 /sql/rpl_gtid.h
parentd795bc9ff8d4a4e17f249a0eb9ac01f25d53a259 (diff)
downloadmariadb-git-1cd6eb5f942ca3e94e86a48512d992fbb3aeecd9.tar.gz
MDEV-26: Global transaction ID.
Change of user interface to be more logical and more in line with expectations to work similar to old-style replication. User can now explicitly choose in CHANGE MASTER whether binlog position is taken into account (master_gtid_pos=current_pos) or not (master_gtid_pos= slave_pos) when slave connects to master. @@gtid_pos is replaced by three separate variables @@gtid_slave_pos (can be set by user, replicated GTIDs only), @@gtid_binlog_pos (read only), and @@gtid_current_pos (a combination of the two, most recent GTID within each domain). mysql.rpl_slave_state is renamed to mysql.gtid_slave_pos to match. This fixes MDEV-4474.
Diffstat (limited to 'sql/rpl_gtid.h')
-rw-r--r--sql/rpl_gtid.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/rpl_gtid.h b/sql/rpl_gtid.h
index bd6663c0659..cc3c99f40b7 100644
--- a/sql/rpl_gtid.h
+++ b/sql/rpl_gtid.h
@@ -91,11 +91,12 @@ struct rpl_slave_state
int update(uint32 domain_id, uint32 server_id, uint64 sub_id, uint64 seq_no);
int truncate_state_table(THD *thd);
int record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id,
- bool in_transaction);
+ bool in_transaction, bool in_statement);
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);
+ int load(THD *thd, char *state_from_master, size_t len, bool reset,
+ bool in_statement);
bool is_empty();
void lock() { DBUG_ASSERT(inited); mysql_mutex_lock(&LOCK_slave_state); }
@@ -150,6 +151,7 @@ struct rpl_binlog_state
uint32 count();
int get_gtid_list(rpl_gtid *gtid_list, uint32 list_size);
int get_most_recent_gtid_list(rpl_gtid **list, uint32 *size);
+ bool append_pos(String *str);
rpl_gtid *find(uint32 domain_id, uint32 server_id);
};