summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2012-09-05 17:40:13 +0200
committerTor Didriksen <tor.didriksen@oracle.com>2012-09-05 17:40:13 +0200
commit50e8ac0b831f9cc02bdc7cbe3b465c295b453d5d (patch)
tree4dabb783472d155b09cb4f5fa0c010f817fc8997 /sql/sql_show.cc
parent75516676f873b6d9aef18f6451481bc6da156fcd (diff)
downloadmariadb-git-50e8ac0b831f9cc02bdc7cbe3b465c295b453d5d.tar.gz
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)
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 1b0f94ce18e..7847fe5b510 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -3164,8 +3164,9 @@ end:
/* 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