File: kill_race_condition.test

package info (click to toggle)
mariadb-10.1 10.1.45-0%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 476,916 kB
  • sloc: cpp: 1,124,656; ansic: 871,843; perl: 52,917; sh: 40,078; pascal: 35,370; javascript: 15,555; yacc: 14,728; ruby: 8,684; xml: 5,377; sql: 3,490; makefile: 2,934; python: 1,970; java: 1,691; asm: 837; lex: 757; php: 22; sed: 16
file content (35 lines) | stat: -rw-r--r-- 999 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
source include/have_debug_sync.inc;
source include/have_binlog_format_row.inc;
source include/master-slave.inc;

connection master;
create table t1 (a int);
--sync_slave_with_master

connection slave;
set global debug_dbug='d,rows_log_event_before_open_table';

connection master;
insert t1 values (1),(2),(3);

connection slave;
set debug_sync='now WAIT_FOR before_open_table';
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';
--let $slave_sql_errno= 1927
--source include/wait_for_slave_sql_error.inc
let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
--echo Last_SQL_Error = $error
set global debug_dbug='';
set debug_sync='RESET';
connection master;
drop table t1;

connection slave;
--source include/start_slave.inc
let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
--echo Last_SQL_Error = $error

source include/rpl_end.inc;