Details
-
Bug
-
Status: In Progress (View Workflow)
-
Critical
-
Resolution: Unresolved
-
N/A
-
None
-
Can result in unexpected behaviour
-
Q4/2025 Server Development
Description
CREATE GLOBAL TEMPORARY TABLE gtt (c INT); |
INSERT INTO gtt VALUES (1); |
|
|
--delimiter //
|
CREATE FUNCTION f() RETURNS INT DETERMINISTIC BEGIN |
RETURN (SELECT COUNT(*) FROM gtt); |
END// |
--delimiter ;
|
|
|
SELECT f(); |
Leads to:
|
MDEV-35915-8 CS 12.2.0 c7ea08421d34fa7d45e27919a869ade968bd88c4 (Optimized, Clang 21.1.3-20250923) Build 20/10/2025 |
CURRENT_TEST: main.test2
|
mysqltest: At line 10: query 'SELECT f()' failed: ER_NO_SUCH_TABLE (1146): Table 'test.gtt' doesn't exist
|
However, it works correctly with a temporary table:
|
MDEV-35915-8 CS 12.2.0 c7ea08421d34fa7d45e27919a869ade968bd88c4 (Optimized, Clang 21.1.3-20250923) Build 20/10/2025 |
SELECT f();
|
f()
|
1
|
main.test2 [ pass ]
|
Attachments
Issue Links
- is caused by
-
MDEV-35915 Implement Global temporary tables
-
- Stalled
-