| 1 |
--let $rpl_topology=1->2 |
| 2 |
--source include/rpl_init.inc |
| 3 |
--source include/have_binlog_format_statement.inc |
| 4 |
|
| 5 |
--connection server_1 |
| 6 |
SET @old_strict= @@GLOBAL.gtid_strict_mode; |
| 7 |
SET GLOBAL gtid_strict_mode= 1; |
| 8 |
select @@global.log_slave_updates; |
| 9 |
|
| 10 |
CREATE TABLE t1 (a INT PRIMARY KEY, b INT); |
| 11 |
INSERT INTO t1 VALUES (1, 1); |
| 12 |
INSERT INTO t1 VALUES (2, 1); |
| 13 |
--save_master_pos |
| 14 |
|
| 15 |
--connection server_2 |
| 16 |
SET @old_strict= @@GLOBAL.gtid_strict_mode; |
| 17 |
SET GLOBAL gtid_strict_mode= 1; |
| 18 |
select @@global.log_slave_updates; |
| 19 |
|
| 20 |
--sync_with_master |
| 21 |
SELECT * FROM t1 ORDER BY a; |
| 22 |
|
| 23 |
--source include/stop_slave.inc |
| 24 |
|
| 25 |
--connection server_1 |
| 26 |
--replace_result $SLAVE_MYPORT SLAVE_PORT |
| 27 |
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SLAVE_MYPORT, master_ssl_verify_server_cert=0, |
| 28 |
master_user = 'root', master_ssl_verify_server_cert=0; |
| 29 |
START SLAVE; |
| 30 |
--source include/wait_for_slave_to_start.inc |
| 31 |
|
| 32 |
--connection server_2 |
| 33 |
INSERT INTO t1 VALUES (3, 2); |
| 34 |
INSERT INTO t1 VALUES (4, 2); |
| 35 |
--source include/save_master_gtid.inc |
| 36 |
|
| 37 |
--source include/show_binlog_events.inc |
| 38 |
|
| 39 |
--connection server_1 |
| 40 |
--source include/sync_with_master_gtid.inc |
| 41 |
|
| 42 |
SELECT * FROM t1 ORDER BY a; |
| 43 |
|
| 44 |
--source include/stop_slave.inc |
| 45 |
RESET SLAVE; |
| 46 |
INSERT INTO t1 VALUES (5, 1); |
| 47 |
INSERT INTO t1 VALUES (6, 1); |
| 48 |
--source include/save_master_gtid.inc |
| 49 |
|
| 50 |
--connection server_2 |
| 51 |
--replace_result $MASTER_MYPORT MASTER_PORT |
| 52 |
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT, master_ssl_verify_server_cert=0; |
| 53 |
START SLAVE; |
| 54 |
--source include/sync_with_master_gtid.inc |
| 55 |
|
| 56 |
SELECT * FROM t1 ORDER BY a; |
| 57 |
|
| 58 |
# Cleanup. |
| 59 |
SET GLOBAL gtid_strict_mode= @old_strict; |
| 60 |
|
| 61 |
--connection server_1 |
| 62 |
SET GLOBAL gtid_strict_mode= @old_strict; |
| 63 |
DROP TABLE t1; |
| 64 |
|
| 65 |
--source include/rpl_end.inc |