Commit 5bc79c0c authored by unknown's avatar unknown
Browse files

Small cleanup of derived tables handling.

We should not call free_tmp_table() for derived table in 
mysql_derived_filling(), since by this moment this table is already
registered in THD::derived_tables list and thus free_tmp_table() will
be called for it automatically in close_thread_tables().


sql/sql_derived.cc:
  We should not call free_tmp_table() for derived table in 
  mysql_derived_filling(), since by this moment this table is already
  registered in THD::derived_tables list and thus free_tmp_table() will
  be called for it automatically in close_thread_tables().
parent e517bb0d
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -268,13 +268,8 @@ int mysql_derived_filling(THD *thd, LEX *lex, TABLE_LIST *orig_table_list)
        unit->cleanup();
    }
    else
    {
      free_tmp_table(thd, table);
      unit->cleanup();
    }
    lex->current_select= save_current_select;
    if (res)
      free_tmp_table(thd, table);
  }
  return res;
}