mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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.
This commit is contained in:
14
sql/log.cc
14
sql/log.cc
@@ -5520,6 +5520,18 @@ MYSQL_BIN_LOG::get_most_recent_gtid_list(rpl_gtid **list, uint32 *size)
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
MYSQL_BIN_LOG::append_state_pos(String *str)
|
||||
{
|
||||
bool err;
|
||||
|
||||
mysql_mutex_lock(&rpl_global_gtid_binlog_state.LOCK_binlog_state);
|
||||
err= rpl_global_gtid_binlog_state.append_pos(str);
|
||||
mysql_mutex_unlock(&rpl_global_gtid_binlog_state.LOCK_binlog_state);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
MYSQL_BIN_LOG::find_in_binlog_state(uint32 domain_id, uint32 server_id,
|
||||
rpl_gtid *out_gtid)
|
||||
@@ -8508,7 +8520,7 @@ binlog_background_thread(void *arg __attribute__((unused)))
|
||||
thd->store_globals();
|
||||
|
||||
/*
|
||||
Load the slave replication GTID state from the mysql.rpl_slave_state
|
||||
Load the slave replication GTID state from the mysql.gtid_slave_pos
|
||||
table.
|
||||
|
||||
This is mostly so that we can start our seq_no counter from the highest
|
||||
|
Reference in New Issue
Block a user