--source include/galera_cluster.inc --source include/have_innodb.inc # # Test that a local LOCK TABLE will be broken by an incoming remote transaction against that table # CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; --connection node_2 SET AUTOCOMMIT=OFF; --let $wsrep_local_bf_aborts_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'` LOCK TABLE t1 WRITE; # Issue a concurrent INSERT against the lock table that will block --connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 --send INSERT INTO t1 VALUES (1); --connection node_1 INSERT INTO t1 VALUES (2); # The concurent insert is allowed to complete because the LOCK TABLE is now broken --connection node_2a --error 0 --reap --let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'` --disable_query_log --eval SELECT $wsrep_local_bf_aborts_after - $wsrep_local_bf_aborts_before = 1 AS wsrep_local_aborts_increment; --enable_query_log DROP TABLE t1;