Skip to content

Commit

Permalink
test case for a previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Apr 25, 2019
1 parent ae1b8b9 commit 33fe3b5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
13 changes: 13 additions & 0 deletions mysql-test/suite/rpl/r/kill_race_condition.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
include/master-slave.inc
[connection master]
set global debug_dbug='d,rows_log_event_before_open_table';
set debug_sync='now WAIT_FOR before_open_table';
create table t1 (a int);
insert t1 values (1),(2),(3);
kill slave_sql_thread;
set debug_sync='now SIGNAL go_ahead_sql';
set global debug_dbug='';
set debug_sync='RESET';
drop table t1;
start slave;
include/rpl_end.inc
28 changes: 28 additions & 0 deletions mysql-test/suite/rpl/t/kill_race_condition.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
source include/have_debug_sync.inc;
source include/have_binlog_format_row.inc;
source include/master-slave.inc;

connection slave;
set global debug_dbug='d,rows_log_event_before_open_table';
send set debug_sync='now WAIT_FOR before_open_table';

connection master;
create table t1 (a int);
insert t1 values (1),(2),(3);

connection slave;
reap;
let $a=`select id from information_schema.processlist where state='debug sync point: now'`;
replace_result $a slave_sql_thread;
eval kill $a;
set debug_sync='now SIGNAL go_ahead_sql';
set global debug_dbug='';
set debug_sync='RESET';

connection master;
drop table t1;

connection slave;
start slave;

source include/rpl_end.inc;

0 comments on commit 33fe3b5

Please sign in to comment.