1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

BUG#20697 slave fails to rollback replicated transaction hang over innodb_lock_wait_timeou

post-merge fixes in test/result
This commit is contained in:
aelkin/elkin@dsl-hkigw8-feaef900-46.dhcp.inet.fi
2006-10-30 17:09:28 +02:00
parent f25db09b96
commit 3a3d673dd5
2 changed files with 20 additions and 11 deletions

View File

@ -75,7 +75,7 @@ show slave status;
stop slave; stop slave;
delete from t3; delete from t3;
change master to master_log_pos=543; # the BEGIN log event change master to master_log_pos=544; # the BEGIN log event
begin; begin;
select * from t2 for update; # hold lock select * from t2 for update; # hold lock
start slave; start slave;
@ -100,7 +100,7 @@ set global max_relay_log_size=0;
# This is really copy-paste of 2) of above # This is really copy-paste of 2) of above
stop slave; stop slave;
delete from t3; delete from t3;
change master to master_log_pos=543; change master to master_log_pos=544;
begin; begin;
select * from t2 for update; select * from t2 for update;
start slave; start slave;

View File

@ -6,7 +6,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
CREATE TABLE t1 (a INT NOT NULL, KEY(a)) ENGINE=innodb; CREATE TABLE t1 (a INT NOT NULL, KEY(a)) ENGINE=innodb;
CREATE TABLE t2 (a INT NOT NULL, KEY(a)) ENGINE=innodb; CREATE TABLE t2 (a INT NOT NULL, KEY(a)) ENGINE=innodb;
CREATE TABLE t3 (a INT) ENGINE=innodb; CREATE TABLE t3 (a INT UNIQUE) ENGINE=innodb;
CREATE TABLE t4 (a INT) ENGINE=innodb; CREATE TABLE t4 (a INT) ENGINE=innodb;
show variables like 'slave_transaction_retries'; show variables like 'slave_transaction_retries';
Variable_name Value Variable_name Value
@ -35,14 +35,14 @@ begin;
select * from t1 for update; select * from t1 for update;
a a
start slave; start slave;
insert into t2 values(22); insert into t2 values(201);
commit; commit;
select * from t1; select * from t1;
a a
1 1
select * from t2; select * from t2;
a a
22 201
show slave status; show slave status;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
@ -78,12 +78,16 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
stop slave; stop slave;
change master to master_log_pos=536; delete from t3;
change master to master_log_pos=544;
begin; begin;
select * from t2 for update; select * from t2 for update;
a a
22 201
start slave; start slave;
select count(*) from t3 /* must be zero */;
count(*)
0
commit; commit;
select * from t1; select * from t1;
a a
@ -91,7 +95,7 @@ a
1 1
select * from t2; select * from t2;
a a
22 201
show slave status; show slave status;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
@ -128,12 +132,16 @@ Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
set global max_relay_log_size=0; set global max_relay_log_size=0;
stop slave; stop slave;
change master to master_log_pos=536; delete from t3;
change master to master_log_pos=544;
begin; begin;
select * from t2 for update; select * from t2 for update;
a a
22 201
start slave; start slave;
select count(*) from t3 /* must be zero */;
count(*)
0
commit; commit;
select * from t1; select * from t1;
a a
@ -142,7 +150,7 @@ a
1 1
select * from t2; select * from t2;
a a
22 201
show slave status; show slave status;
Slave_IO_State # Slave_IO_State #
Master_Host 127.0.0.1 Master_Host 127.0.0.1
@ -178,3 +186,4 @@ Master_SSL_Cipher
Master_SSL_Key Master_SSL_Key
Seconds_Behind_Master # Seconds_Behind_Master #
drop table t1,t2,t3,t4; drop table t1,t2,t3,t4;
End of 5.1 tests