diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test index 078d3d4557d8bfa62901dbc188aa13da7cf6fc3c..60ffab316cfc5d01128f770f8ffaf40a678dcadd 100644 --- a/mysql-test/extra/rpl_tests/rpl_log.test +++ b/mysql-test/extra/rpl_tests/rpl_log.test @@ -13,22 +13,15 @@ save_master_pos; connection slave; sync_with_master; stop slave; +--source include/wait_for_slave_to_stop.inc reset master; reset slave; -# We are going to read the slave's binlog which contains file_id (for some LOAD -# DATA INFILE); to make it repeatable (not influenced by other tests), we need -# to stop and start the slave, to be sure file_id will start from 1. -# This can be done with 'server_stop slave', but -# this would require the manager, so most of the time the test will be skipped -# :( -# To workaround this, I (Guilhem) add a (empty) rpl_log-slave.opt (because when -# mysql-test-run finds such a file it restarts the slave before doing the -# test). That's not very elegant but I could find no better way, sorry. +start slave; +--source include/wait_for_slave_to_start.inc let $VERSION=`select version()`; connection master; -reset master; eval create table t1(n int not null auto_increment primary key)ENGINE=$engine_type; insert into t1 values (NULL); drop table t1; @@ -79,7 +72,6 @@ connection slave; # Note that the above 'slave start' will cause a 3rd rotate event (a fake one) # to go into the relay log (the master always sends a fake one when replication # starts). -start slave; let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%'; --source include/wait_slave_status.inc sync_with_master; @@ -87,6 +79,7 @@ sync_with_master; select * from t1 order by 1 asc; flush logs; stop slave; +--source include/wait_for_slave_to_stop.inc connection master; # Create some entries for second log @@ -95,6 +88,7 @@ eval create table t2 (n int)ENGINE=$engine_type; insert into t2 values (1); source include/show_binlog_events.inc; --replace_result $VERSION VERSION +--replace_regex /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /infile '.+'/infile 'words.dat'/ --replace_column 2 # 5 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ show binlog events in 'master-bin.000002'; @@ -102,10 +96,12 @@ show binary logs; save_master_pos; connection slave; start slave; +--source include/wait_for_slave_to_start.inc sync_with_master; show binary logs; --replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION --replace_column 2 # 5 # +--replace_regex /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /INFILE '.+'/INFILE 'words.dat'/ --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ show binlog events in 'slave-bin.000001' from 4; --replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION diff --git a/mysql-test/suite/rpl/r/rpl_stm_log.result b/mysql-test/suite/rpl/r/rpl_stm_log.result index d29b4c92590ecf92b6718dadae0b211541c505b9..20f8e04afe7f6177c21dace25527f12d6382d88c 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_log.result +++ b/mysql-test/suite/rpl/r/rpl_stm_log.result @@ -7,7 +7,7 @@ start slave; stop slave; reset master; reset slave; -reset master; +start slave; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM; insert into t1 values (NULL); drop table t1; @@ -109,7 +109,6 @@ Aberdeen Abernathy aberrant aberration -start slave; let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; diff --git a/mysql-test/suite/rpl/t/rpl_stm_log-slave.opt b/mysql-test/suite/rpl/t/rpl_stm_log-slave.opt index 8b137891791fe96927ad78e64b0aad7bded08bdc..203fc2287ecbbcfc00f3fe91ea6c99e433b873a6 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_log-slave.opt +++ b/mysql-test/suite/rpl/t/rpl_stm_log-slave.opt @@ -1 +1 @@ - +--log-slave-updates diff --git a/mysql-test/suite/rpl/t/rpl_view-slave.opt b/mysql-test/suite/rpl/t/rpl_view-slave.opt deleted file mode 100644 index 79b3bf6174bcf1438be35e3b885c3683c5fddc6c..0000000000000000000000000000000000000000 --- a/mysql-test/suite/rpl/t/rpl_view-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=test.foo