mariadb/mysql-test/suite/galera/r/MDEV-33136.result
Denis Protivensky 7bf3c3124a MDEV-33136: Properly BF-abort user transactions with explicit locks
User transactions may acquire explicit MDL locks from InnoDB level
when persistent statistics is re-read for a table.
If such a transaction would be subject to BF-abort, it was improperly
detected as a system transaction and wouldn't get aborted.

The fix: Check if a transaction holding explicit MDL locks is a user
transaction in the MDL conflict handling code.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-03-27 01:25:22 +01:00

21 lines
646 B
Text

connection node_2;
connection node_1;
connect node_1a,127.0.0.1,root,,test,$NODE_MYPORT_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_1a;
TRUNCATE TABLE t1;
SET SESSION wsrep_retry_autocommit = 0;
SET DEBUG_SYNC = 'dict_stats_mdl_acquired SIGNAL may_toi WAIT_FOR bf_abort';
INSERT INTO t1 VALUES (1);
connection node_1;
SET DEBUG_SYNC = 'now WAIT_FOR may_toi';
TRUNCATE TABLE t1;
connection node_1a;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_1;
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
disconnect node_1a;
disconnect node_2;
disconnect node_1;