mirror of
https://github.com/MariaDB/server.git
synced 2025-02-21 21:03:09 +01:00
64 lines
1.8 KiB
Text
64 lines
1.8 KiB
Text
![]() |
--source include/have_innodb.inc
|
||
|
--let $rpl_topology=1->2
|
||
|
--source include/rpl_init.inc
|
||
|
|
||
|
--echo *** Test connecting with empty GTID state to start from very beginning of binlog ***
|
||
|
--connection server_2
|
||
|
--source include/stop_slave.inc
|
||
|
RESET MASTER;
|
||
|
RESET SLAVE;
|
||
|
|
||
|
--connection server_1
|
||
|
RESET MASTER;
|
||
|
# Create an empty binlog file, to check that empty binlog state is handled correctly.
|
||
|
FLUSH LOGS;
|
||
|
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||
|
--save_master_pos
|
||
|
|
||
|
--connection server_2
|
||
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
||
|
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
|
||
|
MASTER_GTID_POS="";
|
||
|
--source include/start_slave.inc
|
||
|
--sync_with_master
|
||
|
SELECT * FROM t1;
|
||
|
|
||
|
--connection server_1
|
||
|
INSERT INTO t1 VALUES (1);
|
||
|
--save_master_pos
|
||
|
|
||
|
--connection server_2
|
||
|
--sync_with_master
|
||
|
SELECT * FROM t1;
|
||
|
--source include/stop_slave.inc
|
||
|
|
||
|
--echo *** Test that master gives error when slave asks for empty gtid pos and binlog files have been purged. ***
|
||
|
--connection server_1
|
||
|
FLUSH LOGS;
|
||
|
INSERT INTO t1 VALUES (2);
|
||
|
--save_master_pos
|
||
|
PURGE BINARY LOGS TO 'master-bin.000003';
|
||
|
--source include/show_binary_logs.inc
|
||
|
|
||
|
--connection server_2
|
||
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
||
|
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
|
||
|
MASTER_GTID_POS="";
|
||
|
START SLAVE;
|
||
|
--let $slave_io_errno= 1236
|
||
|
--source include/wait_for_slave_io_error.inc
|
||
|
--source include/stop_slave.inc
|
||
|
|
||
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
||
|
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
|
||
|
MASTER_LOG_FILE="master-bin.000003", MASTER_LOG_POS=4;
|
||
|
--source include/start_slave.inc
|
||
|
--sync_with_master
|
||
|
SELECT * FROM t1 ORDER BY a;
|
||
|
call mtr.add_suppression('Could not find GTID state requested by slave in any binlog files');
|
||
|
|
||
|
--connection server_1
|
||
|
DROP TABLE t1;
|
||
|
|
||
|
--source include/rpl_end.inc
|