1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Last part of fix for BUG#7998 "Replication should be more clever about when to replicate RELEASE_LOCK()" + fixes after merge

This commit is contained in:
guilhem@mysql.com
2005-03-02 17:52:38 +01:00
parent d1f089b3d7
commit 7110f21c39
9 changed files with 49 additions and 57 deletions

View File

@@ -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;