diff options
author | Serge Kozlov <Serge.Kozlov@sun.com> | 2009-11-27 02:32:01 +0300 |
---|---|---|
committer | Serge Kozlov <Serge.Kozlov@sun.com> | 2009-11-27 02:32:01 +0300 |
commit | 9e3b092c92d71cd94b57608f08945939168ad8d8 (patch) | |
tree | c5b83e11d40d5207a08f58fcacd7732681bdf6a7 /mysql-test/extra/rpl_tests | |
parent | 76623d35b8713dfd67b12a42c94db8a728944ae0 (diff) | |
download | mariadb-git-9e3b092c92d71cd94b57608f08945939168ad8d8.tar.gz |
Backport for WL#4416
Diffstat (limited to 'mysql-test/extra/rpl_tests')
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_row_blob.test | 12 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_row_func003.test | 5 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_row_sp003.test | 5 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_stm_000001.test | 4 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_trig004.test | 5 |
5 files changed, 12 insertions, 19 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_row_blob.test b/mysql-test/extra/rpl_tests/rpl_row_blob.test index 080df7d75dd..762daa816c0 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_blob.test +++ b/mysql-test/extra/rpl_tests/rpl_row_blob.test @@ -36,7 +36,7 @@ SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; save_master_pos; connection slave; sync_with_master; -sleep 5; +--source include/wait_for_ndb_to_binlog.inc --echo --echo **** Data Insert Validation Slave Section test.t1 **** --echo @@ -56,12 +56,10 @@ UPDATE t1 set data=repeat('c',17*1024) where c1 = 2; --echo SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -# Sleep is needed for NDB to allow time for -# Injector thread to populate the bin log. save_master_pos; connection slave; sync_with_master; -sleep 5; +--source include/wait_for_ndb_to_binlog.inc --echo --echo **** Data Update Validation Slave Section test.t1 **** --echo @@ -132,7 +130,7 @@ FROM test.t2 WHERE c1=2; save_master_pos; connection slave; sync_with_master; -sleep 5; +--source include/wait_for_ndb_to_binlog.inc --echo --echo **** Data Insert Validation Slave Section test.t2 **** --echo @@ -155,12 +153,10 @@ SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) FROM test.t2 WHERE c1=1; SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) FROM test.t2 WHERE c1=2; -# Sleep is needed for NDB to allow time for -# Injector thread to populate the bin log. save_master_pos; connection slave; sync_with_master; -sleep 5; +--source include/wait_for_ndb_to_binlog.inc --echo --echo **** Data Update Validation Slave Section test.t2 **** --echo diff --git a/mysql-test/extra/rpl_tests/rpl_row_func003.test b/mysql-test/extra/rpl_tests/rpl_row_func003.test index 8ee2d863527..9d4b516f96f 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_func003.test +++ b/mysql-test/extra/rpl_tests/rpl_row_func003.test @@ -44,9 +44,10 @@ END| delimiter ;| INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); -sleep 6; +let $wait_time= 6; +--source include/wait_for_ndb_to_binlog.inc INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); -sleep 6; +--source include/wait_for_ndb_to_binlog.inc #Select in this test are used for debugging #select * from test.t1; diff --git a/mysql-test/extra/rpl_tests/rpl_row_sp003.test b/mysql-test/extra/rpl_tests/rpl_row_sp003.test index 7cf3d0fa19c..7bc326a3791 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_sp003.test +++ b/mysql-test/extra/rpl_tests/rpl_row_sp003.test @@ -41,10 +41,7 @@ CALL test.p2(); SELECT release_lock("test"); SELECT * FROM test.t1; #show binlog events; -# Added sleep for use with NDB to ensure that -# the injector thread will populate log before -# we switch to the slave. -sleep 5; +--source include/wait_for_ndb_to_binlog.inc sync_slave_with_master; connection slave; SELECT * FROM test.t1; diff --git a/mysql-test/extra/rpl_tests/rpl_stm_000001.test b/mysql-test/extra/rpl_tests/rpl_stm_000001.test index 1f5eb5786dd..61d443158d0 100644 --- a/mysql-test/extra/rpl_tests/rpl_stm_000001.test +++ b/mysql-test/extra/rpl_tests/rpl_stm_000001.test @@ -68,8 +68,8 @@ enable_query_log; connection slave; lock tables t1 read; start slave; -#hope this is long enough for I/O thread to fetch over 16K relay log data -sleep 3; +connection master; +--source include/sync_slave_io_with_master.inc unlock tables; #test handling of aborted connection in the middle of update diff --git a/mysql-test/extra/rpl_tests/rpl_trig004.test b/mysql-test/extra/rpl_tests/rpl_trig004.test index 45cb11f2787..1a738db27fc 100644 --- a/mysql-test/extra/rpl_tests/rpl_trig004.test +++ b/mysql-test/extra/rpl_tests/rpl_trig004.test @@ -35,9 +35,8 @@ INSERT INTO test.t2 VALUES (1, 0.0); #show binlog events; select * from test.t1; select * from test.t2; -# Have to sleep for a few seconds to allow -# NDB injector thread to populate binlog -sleep 10; +let $wait_time= 10; +--source include/wait_for_ndb_to_binlog.inc sync_slave_with_master; connection slave; select * from test.t1; |