summaryrefslogtreecommitdiff
path: root/sql/sp_cache.cc
diff options
context:
space:
mode:
authorunknown <pem@mysql.comhem.se>2003-10-21 18:13:14 +0200
committerunknown <pem@mysql.comhem.se>2003-10-21 18:13:14 +0200
commit7e8cc90a8b3ca552c4a81047becb439bad475e96 (patch)
treea3a87b6322217cf5bb7b269594bbf65f2bff8b8b /sql/sp_cache.cc
parent562a04d593ca9a179b851e1d71d30e764e55f7ad (diff)
downloadmariadb-git-7e8cc90a8b3ca552c4a81047becb439bad475e96.tar.gz
Bugfix of previous WL#1265 commit.
Need a sp_cache_remove() function with implicit name lookup to make the WL task to work. It's a cleaner and more convenient interface anyway... sql/sp.cc: Modified sp_cache_remove() function calls; just remove by name. sql/sp_cache.cc: Modified sp_cache_remove() function. Get name and lookup/remove, return the removed entry, if any. sql/sp_cache.h: Modified sp_cache_remove() function. Get name and lookup/remove, return the removed entry, if any.
Diffstat (limited to 'sql/sp_cache.cc')
-rw-r--r--sql/sp_cache.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/sp_cache.cc b/sql/sp_cache.cc
index 84e3565d543..7e9d5f92ef0 100644
--- a/sql/sp_cache.cc
+++ b/sql/sp_cache.cc
@@ -92,10 +92,11 @@ sp_cache_lookup(sp_cache **cp, char *name, uint namelen)
return c->lookup(name, namelen);
}
-void
-sp_cache_remove(sp_cache **cp, sp_head *sp)
+sp_head *
+sp_cache_remove(sp_cache **cp, char *name, uint namelen)
{
sp_cache *c= *cp;
+ sp_head *sp= NULL;
if (c)
{
@@ -108,9 +109,10 @@ sp_cache_remove(sp_cache **cp, sp_head *sp)
if (c->version < v)
c->remove_all();
else
- c->remove(sp);
+ sp= c->remove(name, namelen);
c->version= v+1;
}
+ return sp;
}