blob: 8c70da4f0a878062521324c9936b46759db6bd44 (
plain)
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
|
source include/master-slave.inc;
source include/have_binlog_format_statement.inc;
call mtr.add_suppression("Unsafe statement written to the binary log");
CREATE TABLE t1 (a int);
send INSERT INTO t1 VALUES(SLEEP(2));
connection slave;
let $run = 10;
while ($run)
{
dec $run;
let $sbm=query_get_value(SHOW SLAVE STATUS, Seconds_Behind_Master, 1);
# for debugging uncomment echo and remove the if()
#echo Seconds_Behind_Master: $sbm;
if ($sbm)
{
let $run = 0;
}
sleep 0.5;
}
echo Seconds_Behind_Master: $sbm;
connection master;
reap;
drop table t1;
source include/rpl_end.inc;
|