mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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:
@ -75,9 +75,9 @@ INSERT INTO t3 VALUES (202, "switch1 b");
|
||||
|
||||
--connection slave2
|
||||
--replace_result $SERVER_MYPORT_1 MYPORT_1
|
||||
eval CHANGE MASTER 'slave1' TO master_port=$SERVER_MYPORT_1, master_host='127.0.0.1', master_user='root', master_use_gtid=1;
|
||||
eval CHANGE MASTER 'slave1' TO master_port=$SERVER_MYPORT_1, master_host='127.0.0.1', master_user='root', master_use_gtid=current_pos;
|
||||
--replace_result $SERVER_MYPORT_2 MYPORT_2
|
||||
eval CHANGE MASTER 'slave2' TO master_port=$SERVER_MYPORT_2, master_host='127.0.0.1', master_user='root', master_use_gtid=1;
|
||||
eval CHANGE MASTER 'slave2' TO master_port=$SERVER_MYPORT_2, master_host='127.0.0.1', master_user='root', master_use_gtid=current_pos;
|
||||
SET default_master_connection = 'slave1';
|
||||
START SLAVE;
|
||||
--source include/wait_for_slave_to_start.inc
|
||||
@ -118,7 +118,7 @@ INSERT INTO t3 VALUES (204, "switch 3 b");
|
||||
|
||||
--connection slave1
|
||||
--replace_result $SERVER_MYPORT_4 MYPORT_4
|
||||
eval CHANGE MASTER TO master_port=$SERVER_MYPORT_4, master_host='127.0.0.1', master_user='root', master_use_gtid=1;
|
||||
eval CHANGE MASTER TO master_port=$SERVER_MYPORT_4, master_host='127.0.0.1', master_user='root', master_use_gtid=current_pos;
|
||||
START SLAVE;
|
||||
--let $wait_condition= SELECT (SELECT COUNT(*) FROM t1)=3 AND (SELECT COUNT(*) FROM t2)=4 AND (SELECT COUNT(*) FROM t3)=7
|
||||
--source include/wait_condition.inc
|
||||
|
Reference in New Issue
Block a user