Commit f6edb3f5 authored by unknown's avatar unknown

Free unused JOINs early even if using subqueries.


sql/sql_select.cc:
  According to the conclusion made in the previous patch, we can widen
  the range of cases when JOINs are fully freed early, and include 
  subqueries to it.
parent 024d232a
......@@ -5902,8 +5902,7 @@ void JOIN::join_free(bool full)
Optimization: if not EXPLAIN and we are done with the JOIN,
free all tables.
*/
full= full || (!select_lex->uncacheable && !thd->lex->subqueries &&
!thd->lex->describe);
full= full || (!select_lex->uncacheable && !thd->lex->describe);
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