summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2003-04-03 20:00:52 +0200
committerunknown <pem@mysql.com>2003-04-03 20:00:52 +0200
commitfc448ccb7fba68f874edd8f33ec401873a1b4e1d (patch)
treed04e9413fd6595d44719c40b8f26f56f0e5087fb /sql/sp.cc
parent0d71f5e1d32e5cc963ae246fb1b5ff487915ec23 (diff)
downloadmariadb-git-fc448ccb7fba68f874edd8f33ec401873a1b4e1d.tar.gz
Fixed the last memory leaks in the SP code.
sql/sp.cc: Fixed clear_function_cache bug that made memory freeing work for functions too. sql/sp_head.cc: Added more DBUG output to help finding memory leak. sql/sql_parse.cc: Moved sp_clear_function_cache call so it *works*. Added missing memory freeing call.
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index c8dc328ced1..2d7e38b47bd 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -373,13 +373,11 @@ sp_cache_functions(THD *thd, LEX *lex)
void
sp_clear_function_cache(THD *thd)
{
- //QQ This doesn't work for some completely mysterious reason, but since this
- //QQ is tempoarary code anyway, we just ignore it for now.
- //QQ List_iterator_fast<sp_head> li(thd->spfuns);
- //QQ sp_head *sp;
+ List_iterator_fast<sp_head> li(thd->spfuns);
+ sp_head *sp;
- //QQ while ((sp= li++))
- //QQ sp->destroy();
+ while ((sp= li++))
+ sp->destroy();
thd->spfuns.empty();
}