Commit f6edb3f5 authored by unknown's avatar unknown
Browse files

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);