Commit 50e8ac0b authored by Tor Didriksen's avatar Tor Didriksen

Bug#13734987 MEMORY LEAK WITH I_S/SHOW AND VIEWS WITH SUBQUERY

In fill_schema_table_by_open(): free item list before restoring active arena.


sql/sql_show.cc:
  Replaced i_s_arena.free_items with DBUG_ASSERT(i_s_arena.free_list == NULL)
  (there's nothing to free in that list)
parent 75516676
......@@ -3164,8 +3164,9 @@ fill_schema_table_by_open(THD *thd, bool is_show_fields_or_keys,
/* Restore original LEX value, statement's arena and THD arena values. */
lex_end(thd->lex);
if (i_s_arena.free_list)
i_s_arena.free_items();
// Free items, before restoring backup_arena below.
DBUG_ASSERT(i_s_arena.free_list == NULL);
thd->free_items();
/*
For safety reset list of open temporary tables before closing
......
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