2
# Testing replication delay reporting (bug#29309)
3
# there is an unavoidable non-determinism in the test
4
# please compare the results with the comments
8
source include/master-slave.inc;
12
sync_slave_with_master;
13
--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
14
--replace_column 1 # 8 # 9 # 23 #
15
--query_vertical show slave status /* Second_behind reports 0 */;
21
drop table if exists t1;
22
create table t1 (f1 int);
26
sync_slave_with_master;
27
flush logs /* contaminate rli->last_master_timestamp */;
33
insert into t1 values (1);
38
--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
39
--replace_column 1 # 8 # 9 # 23 #
40
--query_vertical show slave status /* bug emulated: reports slave threads starting time about 3*3 not 3 secs */;
44
sync_slave_with_master;
50
flush logs /* this time rli->last_master_timestamp is not affected */;
54
insert into t1 values (2);
58
--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
59
--replace_column 1 # 8 # 9 # 23 #
60
--query_vertical show slave status /* reports the correct diff with master query time about 3+3 secs */;
67
sync_slave_with_master;