mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed bug mdev-10773.
The temporary tables created for recursive table references should be closed in close_thread_tables(), because they might be used in the statements like ANALYZE WITH r AS (...) SELECT * from r where r is defined through recursion.
This commit is contained in:
@ -1505,3 +1505,15 @@ select id, test_data
|
||||
) as a;
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-10773: ANALYZE for query with recursive CTE
|
||||
--echo #
|
||||
|
||||
--replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/
|
||||
analyze format=json
|
||||
with recursive src(counter) as
|
||||
(select 1
|
||||
union
|
||||
select counter+1 from src where counter<10
|
||||
) select * from src;
|
||||
|
Reference in New Issue
Block a user