wsrep_local_bf_aborts is not incremented if the aborted statement is LOCK TABLE
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL patches by Codership | Status tracked in 5.6 | |||||
5.6 |
Invalid
|
Undecided
|
Unassigned |
Bug Description
If Galera needs to abort a local LOCK TABLE statement in order to satisfy a slave transaction, the wsrep_local_
The counter is properly incremented for all other sorts of statements, e.g. GET_LOCK(), SLEEP(), etc.
Test case:
--source include/
--source include/
#
# Test a local transaction being aborted by a slave one while it is running a LOCK TABLE
#
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
--connection node_2
SET AUTOCOMMIT=OFF;
--let $wsrep_
--send LOCK TABLE t1 WRITE;
--connection node_1
INSERT INTO t1 VALUES (1);
--connection node_2
--reap
--error ER_LOCK_DEADLOCK
--let $wsrep_
# Currently, aborting LOCK TABLE is not counted under wsrep_local_
--disable_query_log
--eval SELECT $wsrep_
--enable_query_log
Actually the counter is not reliable with LOCK TABLE, sometimes it gets incremented and sometimes not.
This is specific to LOCK TABLE, for all the other statements the counter is reliably incremented.