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;