Description:
Reset master command on master will break dump thread in M-S environment. and show slave status on slave will show the error message like this
Last_IO_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 '' at 4, the last event read from './mysql-bin.000002' at 194, the last byte read from './mysql-bin.000002' at 194.'
But if the master has only the first binary logs(****.000001),and execute reset master on master will not break dump thread, and we can not find any error message from slave, the new binary log events will not send to slave either.
How to repeat:
Prepare M-S environment with default variables.
On master:
mysql> show master status\G
*************************** 1. row ***************************
File: mysql-bin.000001
Position: 154
Binlog_Do_DB:
Binlog_Ignore_DB:
Executed_Gtid_Set:
1 row in set (0.00 sec)
mysql> create database test_repl;
Query OK, 1 row affected (0.02 sec)
mysql> use test_repl;
Database changed
mysql> create table t1(id int not null auto_increment primary key,name varchar(100));
Query OK, 0 rows affected (0.03 sec)
mysql>
mysql>
mysql> insert into t1(name) values('ashe');
Query OK, 1 row affected (0.02 sec)
mysql> insert into t1(name) values('ashe');
Query OK, 1 row affected (0.02 sec)
mysql> insert into t1(name) values('ashe');
Query OK, 1 row affected (0.02 sec)
mysql> insert into t1(name) values('ashe');
Query OK, 1 row affected (0.01 sec)
mysql> insert into t1(name) values('ashe');
Query OK, 1 row affected (0.02 sec)
mysql> insert into t1(name) values('ashe');
Query OK, 1 row affected (0.01 sec)
mysql> reset master;
Query OK, 0 rows affected (0.09 sec)
mysql> insert into t1(name) values('ashe');
Query OK, 1 row affected (0.02 sec)
mysql> insert into t1(name) values('ashe');
Query OK, 1 row affected (0.01 sec)
On slave:
show slave status\G
select count(*) from test_repl.t1;
There is no err message on slave. And the last two transactions binary logs has not sent to slave.