Bug #26247 Replication stops during LOCK TABLE concurrency test
Submitted: 10 Feb 2007 0:38 Modified: 15 Feb 2007 20:19
Reporter: Jeb Mershon Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Locking Severity:S1 (Critical)
Version:5.1-wl3561 OS:Linux (Fedora Core 6)
Assigned to: CPU Architecture:Any

[10 Feb 2007 0:38] Jeb Mershon
Description:
While testing locking concurrency with the stress test framework, the SQL thread is sometimes exiting with an error. The error shown by SHOW SLAVE Status is: "Error in Delete_rows event: error during transaction execution on table test.t1"

The problem occurs when using row-based replication and InnoDB.

Jonathan suspects that it is an issue with the way that the master binlog is being written.

How to repeat:
Using the stress test framework, running 3 threads for 30 seconds will reproduce the problem about 1 out of 5 tries. 

-----------------
Initialization:
-----------------
--source include/have_innodb.inc

# Storage engine supports the NOWAIT option.
let $nowait_support= 1;

--disable_warnings
DROP TABLE     IF EXISTS t1;
--enable_warnings

CREATE TABLE t1 (c1 INT) engine=innodb;

-----------------
Test script 1:
-----------------
--echo #
--echo # UNLOCK TABLES commits a transaction when
--echo # non-transactional table locks exist.
--echo # Take a non-transactional lock.
LOCK TABLE t1 WRITE;
--echo # Insert a value.
INSERT INTO t1 VALUES(111);
--echo # Unlock (non-transactional) table locks.
UNLOCK TABLES;
--echo # Show that the inserted value is still in the table.
SELECT * FROM t1;
--echo # Rollback.
ROLLBACK;
--echo # Show that the inserted value is still in the table.
SELECT * FROM t1;

-----------------
Test script 2:
-----------------
DELETE FROM t1;
COMMIT;
[15 Feb 2007 20:19] Jeb Mershon
This problem is more specifically covered by bug # 26366