MDEV-7591 master crashed when slave specfied a future position with semi-repl plugin

cherry-pick the upstream fix

commit d4ba10184cd7bde9c31c610e664ecd0c93605c46
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Wed Jul 2 11:34:11 2014 +0530

    Bug#17453826:ASSERTION ERROR WHEN SETTING FUTURE BINLOG
    FILE/POS WITH SEMISYNC

    Problem:
    ========
    When DMLs are in progress on the master stopping a slave and
    setting ahead binlog name/pos will cause an assert on the
    master.
    ...
This commit is contained in:
Sergei Golubchik 2015-02-20 19:01:03 +01:00
commit b739103f12
3 changed files with 66 additions and 12 deletions

View file

@ -0,0 +1,31 @@
--source include/have_semisync.inc
--source include/master-slave.inc
call mtr.add_suppression("Timeout waiting for reply of binlog*");
create table t1 (i int);
set global rpl_semi_sync_master_enabled = ON;
--connection slave
--source include/stop_slave.inc
set global rpl_semi_sync_slave_enabled = ON;
change master to master_log_file='master-bin.000002', master_log_pos = 320;
start slave;
--let $slave_io_errno=1236
--source include/wait_for_slave_io_error.inc
--connection master
insert into t1 values (1);
reset master;
--connection slave
--source include/stop_slave.inc
reset slave;
--source include/start_slave.inc
set global rpl_semi_sync_slave_enabled = OFF;
--connection master
drop table t1;
set global rpl_semi_sync_master_enabled = OFF;
--source include/rpl_end.inc