diff options
author | pem@mysql.comhem.se <> | 2004-03-11 17:18:59 +0100 |
---|---|---|
committer | pem@mysql.comhem.se <> | 2004-03-11 17:18:59 +0100 |
commit | 6c6bbba00770b241818b35fe4b1d195e0d34142a (patch) | |
tree | 2a790442a0c109f0f5eabc6530c71782c2104c30 /sql/sp_cache.cc | |
parent | 91cc4b288e492df307e7ad35613eba17deadb919 (diff) | |
download | mariadb-git-6c6bbba00770b241818b35fe4b1d195e0d34142a.tar.gz |
WL#1366: Use the schema (db) associated with an SP.
Phase 2: Make SPs belong to a DB, and use qualified names.
As a side effect, using USE in an SP is no longer allowed.
(It just doesn't work otherwise.)
Diffstat (limited to 'sql/sp_cache.cc')
-rw-r--r-- | sql/sp_cache.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/sp_cache.cc b/sql/sp_cache.cc index 93f51938000..e13fb2695e7 100644 --- a/sql/sp_cache.cc +++ b/sql/sp_cache.cc @@ -89,7 +89,7 @@ sp_cache_lookup(sp_cache **cp, sp_name *name) c->version= v; return NULL; } - return c->lookup(name->m_name.str, name->m_name.length); + return c->lookup(name->m_qname.str, name->m_qname.length); } bool @@ -109,7 +109,7 @@ sp_cache_remove(sp_cache **cp, sp_name *name) if (c->version < v) c->remove_all(); else - found= c->remove(name->m_name.str, name->m_name.length); + found= c->remove(name->m_qname.str, name->m_qname.length); c->version= v+1; } return found; @@ -120,7 +120,10 @@ static byte * hash_get_key_for_sp_head(const byte *ptr, uint *plen, my_bool first) { - return (byte*) ((sp_head*)ptr)->name(plen); + sp_head *sp= (sp_head *)ptr; + + *plen= sp->m_qname.length; + return (byte*) sp->m_qname.str; } static void |