Commit 9b2d517b authored by konstantin@mysql.com's avatar konstantin@mysql.com

Free unused JOINs early even if using subqueries.

parent 153861fa
...@@ -5902,8 +5902,7 @@ void JOIN::join_free(bool full) ...@@ -5902,8 +5902,7 @@ void JOIN::join_free(bool full)
Optimization: if not EXPLAIN and we are done with the JOIN, Optimization: if not EXPLAIN and we are done with the JOIN,
free all tables. free all tables.
*/ */
full= full || (!select_lex->uncacheable && !thd->lex->subqueries && full= full || (!select_lex->uncacheable && !thd->lex->describe);
!thd->lex->describe);
cleanup(full); cleanup(full);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment