Debian Codegraph @

mysql-test/suite/rpl/t/rpl_flushlog_loop.test

raw
1 # Testing if "flush logs" command bouncing resulting in logs created in a loop
2 # in case of bi-directional replication
3 --source include/not_group_replication_plugin.inc
4 --source include/force_myisam_default.inc
5 --source include/have_myisam.inc
6 --let $rpl_topology= 1->2->1
7 --source include/rpl_init.inc
8
9 let $MYSQLD_DATADIR= `select @@datadir`;
10 --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR/
11 show variables like 'relay_log%';
12
13 #
14 # Flush logs of slave
15 #
16 # Create full loop by following way:
17 # 1. Insert into t1 on master (1st).
18 # 2. Insert into t1 on slave (2nd) when the event (1st) for t1 replicated.
19 # 3. Master waits until the event (2nd) for t1 will be replicated.
20
21 CREATE TABLE t1 (a INT KEY) ENGINE= MyISAM;
22 let $wait_binlog_event= CREATE TABLE t1;
23 --source include/wait_for_binlog_event.inc
24 --let $sync_slave_connection= server_2
25 --source include/sync_slave_sql_with_master.inc
26
27 connection server_1;
28 INSERT INTO t1 VALUE(1);
29 FLUSH LOGS;
30 --let $sync_slave_connection= server_2
31 --source include/sync_slave_sql_with_master.inc
32
33 INSERT INTO t1 VALUE(2);
34 let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1);
35 --let $sync_slave_connection= server_1
36 --source include/sync_slave_sql_with_master.inc
37
38 #
39 # Check that the master server's slave threads are still running and show
40 # Relay_Log_File
41 #
42 --source include/check_slave_is_running.inc
43 --let status_items= Relay_Log_File
44 --source include/show_slave_status.inc
45
46 --disable_query_log
47 connection server_1;
48 DROP TABLE t1;
49 --let $sync_slave_connection= server_2
50 --source include/sync_slave_sql_with_master.inc
51 --enable_query_log
52
53 --source include/rpl_end.inc