include/master-slave.inc
Warnings:
Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection master]
FLUSH LOGS;
CREATE TABLE t1(c1 INT);
include/sync_slave_sql_with_master.inc
FLUSH LOGS;
call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log');
include/wait_for_slave_io_error.inc [errno=1236]
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log; the first event 'master-bin.000001' at XXX, the last event read from './master-bin.000002' at XXX, the last byte read from './master-bin.000002' at XXX.''
CREATE TABLE t2(c1 INT);
FLUSH LOGS;
CREATE TABLE t3(c1 INT);
FLUSH LOGS;
CREATE TABLE t4(c1 INT);
START SLAVE IO_THREAD;
include/wait_for_slave_io_to_start.inc
include/sync_slave_sql_with_master.inc
SHOW TABLES;
Tables_in_test
t1
t2
t3
t4
DROP TABLE t1, t2, t3, t4;
include/sync_slave_sql_with_master.inc

# BUG#21437 server_errno=29 error message flood mysqld error log
# --------------------------------------------------------------------------
# This test verifies if the ER_MASTER_FATAL_ERROR_READING_BINLOG which
# insteads of EE_FILENOTFOUND error is sent to slave, so that the slave
# I/O thread stops immediately.
include/rpl_reset.inc
[ on master ]
call mtr.add_suppression("Got fatal error 1236 from master when reading data from binary log:");
CREATE TABLE t1(c1 int);
DROP TABLE t1;
FLUSH LOGS;
CREATE TABLE t2(c1 int);
DROP TABLE t2;
include/sync_slave_sql_with_master.inc
[ on slave ]
include/stop_slave.inc
[ on master ]
# This operation will result in error EE_FILENOTFOUND which happens
# when slave IO thread is connecting to master.
[ on slave ]
CHANGE MASTER TO master_host='127.0.0.1', master_log_file='master-bin.000001';
START SLAVE IO_THREAD;
# Instead of EE_FILENOTFOUND, ER_MASTER_FATAL_ERROR_READING_BINLOG
# and the specific information are sent to slave.
include/wait_for_slave_io_error.inc [errno=1236]
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Could not open log file''
[ on master ]
# Restore master-bin.000001 file
[ on slave ]
CHANGE MASTER TO master_host='127.0.0.1', master_log_file='master-bin.000002';
include/start_slave.inc
[ on master ]
CREATE TABLE t1(c1 INT);
include/sync_slave_sql_with_master.inc
[ on slave ]
SELECT * FROM t1;
c1
DROP TABLE t1;
include/rpl_end.inc
