mariadb/mysql-test/suite/galera/r/MDEV-30955.result
Daniele Sciascia feeeacc4d7 MDEV-30955 Explicit locks released too early in rollback path
Assertion `thd->mdl_context.is_lock_owner()` fires when a client is
disconnected, while transaction and and a table is opened through
`HANDLER` interface.
Reason for the assertion is that when a connection closes, its ongoing
transaction is eventually rolled back in
`Wsrep_client_state::bf_rollback()`. This method also releases explicit
which are expected to survive beyond the transaction lifetime.
This patch also removes calls to `mysql_ull_cleanup()`. User level
locks are not supported in combination with Galera, making these calls
unnecessary.
2023-04-18 13:57:59 +02:00

26 lines
723 B
Text

connection node_2;
connection node_1;
CREATE TABLE t (a CHAR(1) KEY);
START TRANSACTION;
HANDLER t OPEN;
disconnect node_1;
connect node_1, 127.0.0.1, root, , test, $NODE_MYPORT_1;
DROP TABLE t;
BACKUP STAGE START;
START TRANSACTION;
disconnect node_1;
connect node_1, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY);
START TRANSACTION;
INSERT INTO t1 VALUES(1);
HANDLER t2 OPEN;
connection node_2;
INSERT INTO t1 VALUES(1);
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1a;
connection node_1;
COMMIT;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1,t2;