mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / suite / rpl / t / rpl_cross_version.test
blobd3e834b5358ca7019a2be5e577b718a246a6a00b
1 # ==== Purpose ====
3 # Verify cross-version replication from an old master to the up-to-date slave
5 # ==== Implementation ====
7 # Feed to the slave server a binlog recorded on an old version master 
8 # via setting up slave-to-slave replication. The latter is done by means of
9 # the opt file and include/setup_fake_relay_log.inc.
10 # The master's binlog is treated as a relay log that the SQL thread executes.
13 --source include/master-slave.inc
15 # The test is disabled for windows due to 
16 # Bug #42879 CHANGE MASTER RELAY_LOG_FILE=path fails on windows
17 # Todo: release it from not_windows
18 --source include/not_windows.inc
21 # Bug#31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
24 --echo ==== Initialize ====
25 --connection slave
26 --source include/stop_slave.inc
27 RESET SLAVE;
29 # the relay log contains create t1, t3 tables and load data infile
30 --let $fake_relay_log = $MYSQL_TEST_DIR/suite/binlog/std_data/binlog_old_version_4_1.000001
31 --source include/setup_fake_relay_log.inc
33 --echo ==== Test ====
34 start slave sql_thread;
35 --let $slave_param = Exec_Master_Log_Pos
36 # end_log_pos of the last event of the relay log
37 --let $slave_param_value = 149436
38 --source include/wait_for_slave_param.inc
39 --echo ==== a prove that the fake has been processed successfully ====
40 SELECT COUNT(*) - 17920 as zero FROM t3;
42 --echo ==== Clean up ====
43 --source include/stop_slave_sql.inc
44 --source include/cleanup_fake_relay_log.inc
45 drop table t1, t3;
46 --let $rpl_only_running_threads= 1
47 --source include/rpl_end.inc