1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +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

@ -1381,6 +1381,11 @@ public:
*/
TABLE *derived_tables;
/*
Temporary tables created for recursive table references.
*/
TABLE *rec_tables;
/*
During a MySQL session, one can lock tables in two modes: automatic
or manual. In automatic mode all necessary tables are locked just before
@ -1461,6 +1466,7 @@ public:
open_tables= 0;
temporary_tables= 0;
derived_tables= 0;
rec_tables= 0;
extra_lock= 0;
lock= 0;
locked_tables_mode= LTM_NONE;