mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user