summaryrefslogtreecommitdiff
path: root/mysql-test/t/rpl_flushlog_loop.test
blob: 471c45a1aa356805356ac2375fb0e4d3e05c9586 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Testing if "flush logs" command bouncing resulting in logs created in a loop 
# in case of bi-directional replication
-- source include/master-slave.inc

#
#  Start replication master -> slave 
#
# We have to sync with master, to ensure slave had time to start properly
# before we stop it. If not, we get errors about UNIX_TIMESTAMP() in the log.
sync_slave_with_master;
connection slave;
--disable_warnings
stop slave;
--enable_warnings
--replace_result $MASTER_MYPORT MASTER_PORT
eval change master to master_host='127.0.0.1',master_user='root',
 master_password='',master_port=$MASTER_MYPORT;
start slave;

#
#  Start replication slave -> master
#
connection master;
--disable_warnings
stop slave;
--enable_warnings
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval change master to master_host='127.0.0.1',master_user='root',
 master_password='',master_port=$SLAVE_MYPORT;
start slave;

#
#  Wait for start of slave IO and SQL threads
#
let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%0%0%None%';
--source include/wait_slave_status.inc

#
#  Flush logs of slave
#
flush logs;
sleep 5;

#
#  Show status of slave
#
--replace_result $SLAVE_MYPORT SLAVE_PORT
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
--vertical_results
SHOW SLAVE STATUS;