diff options
author | Igor Babaev <igor@askmonty.org> | 2017-01-28 14:52:19 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2017-01-28 15:47:11 -0800 |
commit | abfcdb8fbc4dec1ef9e6ea8fc9961344186b0209 (patch) | |
tree | ad29f96d2bbff77ef346507d387f6b31b907a6f8 /sql/sql_class.h | |
parent | 64b5e94236e7c4246863fc70b91c346ba7b66b8b (diff) | |
download | mariadb-git-abfcdb8fbc4dec1ef9e6ea8fc9961344186b0209.tar.gz |
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.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index b6dafd939bc..295474d0d62 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -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; |