mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +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:
@ -49,7 +49,7 @@ save_master_pos;
|
||||
connection server_4;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
|
||||
MASTER_USE_GTID=1;
|
||||
MASTER_USE_GTID=CURRENT_POS;
|
||||
--source include/start_slave.inc
|
||||
sync_with_master;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
@ -60,7 +60,7 @@ connection server_2;
|
||||
--source include/stop_slave.inc
|
||||
--replace_result $SERVER_MYPORT_4 SERVER_MYPORT_4
|
||||
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_4,
|
||||
MASTER_USE_GTID=1;
|
||||
MASTER_USE_GTID=CURRENT_POS;
|
||||
--source include/start_slave.inc
|
||||
|
||||
connection server_4;
|
||||
@ -85,7 +85,7 @@ COMMIT;
|
||||
connection server_3;
|
||||
--replace_result $SERVER_MYPORT_4 SERVER_MYPORT_4
|
||||
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_4,
|
||||
MASTER_USE_GTID=1;
|
||||
MASTER_USE_GTID=CURRENT_POS;
|
||||
--source include/start_slave.inc
|
||||
# This time, let's sync up without reference to binlog on D.
|
||||
--let $wait_condition= SELECT COUNT(*) = 7 FROM t2
|
||||
@ -93,7 +93,7 @@ eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_4,
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
|
||||
--echo *** Now change everything back to what it was, to make rpl_end.inc happy
|
||||
# Also check that MASTER_USE_GTID=1 is still enabled.
|
||||
# Also check that MASTER_USE_GTID=CURRENT_POS is still enabled.
|
||||
connection server_2;
|
||||
# We need to sync up server_2 before switching. If it happened to have reached
|
||||
# the point 'UPDATE t2 SET b="j1a" WHERE a=5' it will fail to connect to
|
||||
|
Reference in New Issue
Block a user