Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
N/A
-
None
-
Q4/2025 Server Development
Description
When we drop a GTT table (in ON COMMIT PRESERVE ROWS mode) on primary and while the table is in use in a replica session, the replica session sees a Deadlock on the GTT. But if we close the replica session the deadlock is gone and the DROP TABLE gets executed successfully.
MTR Test
-- source include/master-slave.inc
|
-- source include/have_binlog_format_row.inc
|
|
--connect (m1,127.0.0.1,root,,,$SERVER_MYPORT_1)
|
CREATE GLOBAL TEMPORARY TABLE gtt(i int, t text) ON COMMIT PRESERVE ROWS;
|
INSERT INTO gtt VALUES (1, 'from master');
|
--disconnect m1
|
|
--connect (s1,127.0.0.1,root,,,$SERVER_MYPORT_2)
|
INSERT INTO gtt VALUES (2, 'from slave');
|
|
--connect (m2,127.0.0.1,root,,,$SERVER_MYPORT_1)
|
DROP TABLE gtt;
|
|
--connection s1
|
SHOW TABLES;
|
query_vertical SHOW SLAVE STATUS;
|
--error ER_LOCK_DEADLOCK
|
SELECT * FROM gtt;
|
--disconnect s1
|
|
--connect (s2,127.0.0.1,root,,,$SERVER_MYPORT_2)
|
SHOW TABLES;
|
query_vertical SHOW SLAVE STATUS;
|
--error ER_NO_SUCH_TABLE
|
SELECT * FROM gtt;
|
Note:
In ON COMMIT DELETE ROWS mode the DROP TABLE is applied on the replica successfully without any error.
Expected behavior:
ON COMMIT PRESERVE ROWS mode shouldn't see any deadlock error.
Attachments
Issue Links
- is caused by
-
MDEV-35915 Implement Global temporary tables
-
- Stalled
-