Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
N/A
-
Not for Release Notes
-
Q4/2025 Server Maintenance
Description
CREATE GLOBAL TEMPORARY TABLE t (x INT KEY) ON COMMIT PRESERVE ROWS; |
SELECT * FROM t; |
LOCK TABLE t WRITE; |
FLUSH TABLE t; |
Leads to a thread hang
MDEV-35915-4 CS 12.0.1 f1695245f879f76c9742ad9e74df84ec0ea2a6a4 (Optimized, Clang 21.1.0-20250811) Build 12/09/2025 |
12.0.1-opt>SHOW PROCESSLIST;
|
+----+------+-----------+------+---------+------+----------+------------------+----------+
|
| Id | User | Host | db | Command | Time | State | Info | Progress |
|
+----+------+-----------+------+---------+------+----------+------------------+----------+
|
| 4 | root | localhost | test | Query | 1372 | starting | FLUSH TABLE t | 0.000 |
|
| 5 | root | localhost | test | Query | 0 | starting | SHOW PROCESSLIST | 0.000 |
|
+----+------+-----------+------+---------+------+----------+------------------+----------+
|
2 rows in set (0.000 sec)
|
Additionally, even if the query is interrupted with CTRL+c, a subsequent mariadb-admin shutdown command will also hang (without new client connections being possible).
This does not happen with ordinary tables ('Query OK' result), nor with regular TT tables ('ERROR 1100 (HY000): Table 't' was not locked with LOCK TABLES' result).
MyISAM and InnoDB both affected. Testcase is CLI and MTR compatible. UB+ASAN builds have the same outcome, and no *SAN issues observed upon CTRL+c.
Attachments
Issue Links
- is caused by
-
MDEV-35915 Implement Global temporary tables
-
- In Testing
-
- relates to
-
MDEV-37385 Thread hang on CoR where the original table is a GTT
-
- Closed
-
-
MDEV-37594 Thread hang on TRUNCATE GTT after server_id change
-
- Stalled
-