mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-26: Global transaction ID.
Replace CHANGE MASTER TO ... master_gtid_pos='xxx' with a new system variable @@global.gtid_pos. This is more logical; @@gtid_pos is global, not per-master, and it is not affected by RESET SLAVE. Also rename master_gtid_pos=AUTO to master_use_gtid=1, which again is more logical.
This commit is contained in:
@@ -38,12 +38,13 @@ SET sql_log_bin = 0;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET sql_log_bin = 1;
|
||||
INSERT INTO t1 VALUES (3);
|
||||
CHANGE MASTER TO master_gtid_pos = "0-1-1";
|
||||
ERROR HY000: Requested MASTER_GTID_POS 0-1-1 conflicts with the binary log which contains a more recent GTID 0-2-11. To use the requested MASTER_GTID_POS, the old binlog must be removed with RESET MASTER to avoid out-of-order binlog
|
||||
CHANGE MASTER TO master_gtid_pos = "";
|
||||
ERROR HY000: Requested MASTER_GTID_POS contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-11. To use the requested MASTER_GTID_POS, the old binlog must be removed with RESET MASTER to avoid out-of-order binlog
|
||||
CHANGE MASTER TO master_use_gtid=1;
|
||||
SET GLOBAL gtid_pos = "0-1-1";
|
||||
ERROR HY000: Requested GTID_POS 0-1-1 conflicts with the binary log which contains a more recent GTID 0-2-11. To use the requested GTID_POS, the old binlog must be removed with RESET MASTER to avoid out-of-order binlog
|
||||
SET GLOBAL gtid_pos = "";
|
||||
ERROR HY000: Requested GTID_POS contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-11. To use the requested GTID_POS, the old binlog must be removed with RESET MASTER to avoid out-of-order binlog
|
||||
RESET MASTER;
|
||||
CHANGE MASTER TO master_gtid_pos = "0-1-1";
|
||||
SET GLOBAL gtid_pos = "0-1-1";
|
||||
START SLAVE;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
@@ -53,7 +54,7 @@ a
|
||||
4
|
||||
*** Test slave requesting a GTID that is not present in the master's binlog ***
|
||||
include/stop_slave.inc
|
||||
CHANGE MASTER TO master_gtid_pos = "0-1-3";
|
||||
SET GLOBAL gtid_pos = "0-1-3";
|
||||
START SLAVE;
|
||||
SET sql_log_bin=0;
|
||||
CALL mtr.add_suppression("Got fatal error .* from master when reading data from binary log: 'Error: connecting slave requested to start from GTID .*, which is not in the master's binlog'");
|
||||
@@ -64,7 +65,7 @@ Last_IO_Errno = '1236'
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Error: connecting slave requested to start from GTID 0-1-3, which is not in the master's binlog''
|
||||
Using_Gtid = '1'
|
||||
include/stop_slave.inc
|
||||
CHANGE MASTER TO master_gtid_pos = "0-1-2";
|
||||
SET GLOBAL gtid_pos = "0-1-2";
|
||||
START SLAVE;
|
||||
include/wait_for_slave_to_start.inc
|
||||
INSERT INTO t1 VALUES (5);
|
||||
|
Reference in New Issue
Block a user