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.
This commit is contained in:
Tor Didriksen 2012-09-05 17:40:13 +02:00
parent fc7e232a62
commit fe36ad9778

View File

@ -3164,8 +3164,9 @@ end:
/* Restore original LEX value, statement's arena and THD arena values. */ /* Restore original LEX value, statement's arena and THD arena values. */
lex_end(thd->lex); lex_end(thd->lex);
if (i_s_arena.free_list) // Free items, before restoring backup_arena below.
i_s_arena.free_items(); DBUG_ASSERT(i_s_arena.free_list == NULL);
thd->free_items();
/* /*
For safety reset list of open temporary tables before closing For safety reset list of open temporary tables before closing