From 5a5fc3433c06eb09708b24d2c94dbf60e20a0779 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Mar 2005 17:52:38 +0100 Subject: Last part of fix for BUG#7998 "Replication should be more clever about when to replicate RELEASE_LOCK()" + fixes after merge mysql-test/r/drop_temp_table.result: result update mysql-test/r/mix_innodb_myisam_binlog.result: result update mysql-test/r/rpl000001.result: result update mysql-test/r/rpl_change_master.result: result update mysql-test/r/rpl_deadlock.result: result update (merge) mysql-test/t/rpl000001.test: can't rely on GET_LOCK() to do slave synchro (use table lock instead) mysql-test/t/rpl_change_master.test: changing the test as we can't use GET_LOCK() for slave synchro mysql-test/t/rpl_deadlock.test: update (merge) binlog positions mysql-test/t/rpl_get_lock.test: comment --- mysql-test/t/rpl_change_master.test | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'mysql-test/t/rpl_change_master.test') diff --git a/mysql-test/t/rpl_change_master.test b/mysql-test/t/rpl_change_master.test index ddac966b073..23866447c98 100644 --- a/mysql-test/t/rpl_change_master.test +++ b/mysql-test/t/rpl_change_master.test @@ -1,16 +1,23 @@ +# Verify that after CHANGE MASTER, replication (I/O thread and SQL +# thread) restart from where SQL thread left, not from where +# I/O thread left (some old bug fixed in 4.0.17) + source include/master-slave.inc; -connection slave; -select get_lock("a",5); connection master; +# Make SQL slave thread advance a bit create table t1(n int); -insert into t1 values(1+get_lock("a",15)*0); +sync_slave_with_master; +select * from t1; +# Now stop it and make I/O slave thread be ahead +stop slave sql_thread; +connection master; +insert into t1 values(1); insert into t1 values(2); save_master_pos; connection slave; ---real_sleep 3; # can't sync_with_master as we should be blocked +--real_sleep 3; # wait for I/O thread to have read updates stop slave; -select * from t1; --replace_result $MASTER_MYPORT MASTER_MYPORT --replace_column 1 # 8 # 9 # 23 # 33 # show slave status; @@ -18,8 +25,6 @@ change master to master_user='root'; --replace_result $MASTER_MYPORT MASTER_MYPORT --replace_column 1 # 8 # 9 # 23 # 33 # show slave status; -# Will restart from after the values(2), which is bug -select release_lock("a"); start slave; sync_with_master; select * from t1; -- cgit v1.2.1