File: rpl_mdev8193.test

package info (click to toggle)
mariadb 1%3A11.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 772,520 kB
  • sloc: ansic: 2,414,714; cpp: 1,791,394; asm: 381,336; perl: 62,905; sh: 49,647; pascal: 40,897; java: 39,363; python: 20,791; yacc: 20,432; sql: 17,907; xml: 12,344; ruby: 8,544; cs: 6,542; makefile: 6,145; ada: 1,879; lex: 1,193; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (56 lines) | stat: -rw-r--r-- 1,543 bytes parent folder | download | duplicates (7)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--source include/have_binlog_format_statement.inc
--source include/master-slave.inc

--connection slave

--source include/stop_slave_sql.inc

--connection master

CALL mtr.add_suppression("Statement is unsafe because it uses a system function that may return a different value on the slave");
create table t1 (i int);
insert into t1 values (1),(2);
insert into t1 values (3),(4);
# This sleep() helps trigger the failure more reliably.
insert into t1 select i+20+0*sleep(1) from t1 where i=1;
flush logs;
insert into t1 values (5),(6);
insert into t1 values (7),(8);
insert into t1 values (9),(10);

--let $master_file = query_get_value(show master status,File,1)
--let $master_pos = query_get_value(show master status,Position,1)

insert into t1 values (11),(12);
insert into t1 values (13),(14);
insert into t1 values (15),(16);

--connection slave

set global slave_parallel_threads = 1;
--replace_result $master_file MASTER_FILE $master_pos MASTER_POS
eval start slave until master_log_file='$master_file', master_log_pos=$master_pos;

--let $show_statement = SHOW SLAVE STATUS
--let $field = Slave_SQL_Running
--let $condition = = 'No'
--let $wait_timeout = 10

--source include/wait_show_condition.inc

if (`select COUNT(*) > 11 from t1`) 
{
	query_vertical show slave status;
	SELECT * FROM t1;
	die "Wrong number of rows in the table";
}

drop table t1;
--source include/stop_slave_io.inc
set global slave_parallel_threads = DEFAULT;

--connection master
drop table t1;

--let $rpl_only_running_threads= 1
--source include/rpl_end.inc