mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / suite / rpl / t / rpl_flushlog_loop.test
blobd5d362bac0f07692380bf9c2bd4fc6c63e48e939
1 # Testing if "flush logs" command bouncing resulting in logs created in a loop 
2 # in case of bi-directional replication
3 --let $rpl_topology= 1->2->1
4 --source include/rpl_init.inc
6 let $MYSQLD_DATADIR= `select @@datadir`;
7 --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR/
8 show variables like 'relay_log%';
11 #  Flush logs of slave
13 # Create full loop by following way:
14 # 1. Insert into t1 on master (1st).
15 # 2. Insert into t1 on slave (2nd) when the event (1st) for t1 replicated.
16 # 3. Master waits until the event (2nd) for t1 will be replicated.
18 CREATE TABLE t1 (a INT KEY) ENGINE= MyISAM;
19 let $wait_binlog_event= CREATE TABLE t1;
20 --source include/wait_for_binlog_event.inc
21 sync_slave_with_master server_2;
23 connection server_1;
24 INSERT INTO t1 VALUE(1);
25 FLUSH LOGS;
26 sync_slave_with_master server_2;
28 INSERT INTO t1 VALUE(2);
29 let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1);
30 sync_slave_with_master server_1;
33 # Check that the master server's slave threads are still running and show
34 # Relay_Log_File
36 --source include/check_slave_is_running.inc
37 --let status_items= Relay_Log_File
38 --source include/show_slave_status.inc
40 --disable_query_log
41 connection server_1;
42 DROP TABLE t1;
43 sync_slave_with_master server_2;
44 --enable_query_log
46 --source include/rpl_end.inc