Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
N/A
-
Can result in unexpected behaviour
Description
CREATE TABLE t2 (c INT); |
LOCK TABLES t2 WRITE;
|
CREATE OR REPLACE TEMPORARY TABLE t2 SELECT 0; |
ALTER TABLE t2 FORCE; |
Works fine:
|
MDEV-35915-v11 CS 12.2.0 8934bac9ea05b79f7a5109d9e980cb939a24d4e3 (Debug, Clang 21.1.3-20250923) Build 19/01/2026 |
12.2.0-dbg>ALTER TABLE t2 FORCE;
|
Query OK, 1 row affected (0.000 sec)
|
Records: 1 Duplicates: 0 Warnings: 0
|
However for the same testcase with GTT instead of TT:
CREATE TABLE t2 (c INT); |
LOCK TABLES t2 WRITE;
|
CREATE OR REPLACE GLOBAL TEMPORARY TABLE t2 SELECT 0; |
ALTER TABLE t2 FORCE; |
We see:
|
MDEV-35915-v11 CS 12.2.0 8934bac9ea05b79f7a5109d9e980cb939a24d4e3 (Debug, Clang 21.1.3-20250923) Build 19/01/2026 |
12.2.0-dbg>ALTER TABLE t2 FORCE;
|
ERROR 1099 (HY000): Table 't2' was locked with a READ lock and can't be updated
|
Verified to happen at least with InnoDB, MyISAM, and Aria.
Attachments
Issue Links
- is caused by
-
MDEV-35915 Implement Global temporary tables
-
- Stalled
-
- split from
-
MDEV-38481 GTT: Assertion `file->trn == trn' failed in ha_maria::start_stmt on Aria ANALYZE TABLE
-
- Closed
-