1
0
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:
Igor Babaev
2017-01-28 14:52:19 -08:00
parent 64b5e94236
commit abfcdb8fbc
5 changed files with 108 additions and 1 deletions

View File

@ -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;