summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2006-05-04 15:30:38 +0300
committerunknown <monty@mysql.com>2006-05-04 15:30:38 +0300
commit93db6d4aa2ec163f85fee5e630421419b6767aef (patch)
tree4862c051c6d6495a8c7c01a8d451ce10c0c8c2e5 /sql/sp_head.cc
parenta766cf91ab21d0ecdc6de689148964c97ea3180a (diff)
downloadmariadb-git-93db6d4aa2ec163f85fee5e630421419b6767aef.tar.gz
Fixed memory leak in sql_parse.cc (lex_end() was not called)
This caused sp-vars.test to fail sql/item_func.h: Removed compiler warning sql/sp.cc: Fixed memory leak in sql_parse.cc sql/sp_head.cc: Fixed memory leak in sql_parse.cc sql/sp_head.h: Fixed memory leak in sql_parse.cc
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 6b7cdb1ea98..6a7676c7bf2 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -671,6 +671,7 @@ sp_head::destroy()
DBUG_ASSERT(m_lex.is_empty() || m_thd);
while ((lex= (LEX *)m_lex.pop()))
{
+ lex_end(m_thd->lex);
delete m_thd->lex;
m_thd->lex= lex;
}
@@ -1643,7 +1644,10 @@ sp_head::restore_lex(THD *thd)
*/
merge_table_list(thd, sublex->query_tables, sublex);
if (! sublex->sp_lex_in_use)
+ {
+ lex_end(sublex);
delete sublex;
+ }
thd->lex= oldlex;
DBUG_VOID_RETURN;
}