diff options
author | unknown <pem@mysql.comhem.se> | 2004-03-22 14:44:41 +0100 |
---|---|---|
committer | unknown <pem@mysql.comhem.se> | 2004-03-22 14:44:41 +0100 |
commit | 645d19f694c1237d4c9d34475dcbdc541e9f35d6 (patch) | |
tree | e2093fe206e23fb00b58e65431a5409e74f2751e /sql/sp_cache.cc | |
parent | d2ad3cff192de352961ec01f5370821690d7173f (diff) | |
download | mariadb-git-645d19f694c1237d4c9d34475dcbdc541e9f35d6.tar.gz |
WL#1366: Use the schema (db) associated with an SP.
Phase 4 (final): Remove associated stored procedures when a database is dropped.
mysql-test/r/sp-security.result:
drop database now deletes associated SPs.
mysql-test/r/sp.result:
drop database now deletes associated SPs.
mysql-test/t/sp-security.test:
drop database now deletes associated SPs.
mysql-test/t/sp.test:
drop database now deletes associated SPs.
sql/sp.cc:
New function for deleting all SPs associated with a database.
sql/sp.h:
New function for deleting all SPs associated with a database.
sql/sp_cache.cc:
New function for just invalidating all SP caches (when dropping a database).
sql/sp_cache.h:
New function for just invalidating all SP caches (when dropping a database).
sql/sql_db.cc:
When dropping a database, also delete all associated SPs.
Diffstat (limited to 'sql/sp_cache.cc')
-rw-r--r-- | sql/sp_cache.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sp_cache.cc b/sql/sp_cache.cc index e13fb2695e7..056ac6d7e96 100644 --- a/sql/sp_cache.cc +++ b/sql/sp_cache.cc @@ -115,6 +115,13 @@ sp_cache_remove(sp_cache **cp, sp_name *name) return found; } +void +sp_cache_invalidate() +{ + pthread_mutex_lock(&Cversion_lock); // LOCK + Cversion++; + pthread_mutex_unlock(&Cversion_lock); // UNLOCK +} static byte * hash_get_key_for_sp_head(const byte *ptr, uint *plen, |