summaryrefslogtreecommitdiffstats
path: root/sql/sp_cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sp_cache.cc')
-rw-r--r--sql/sp_cache.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/sql/sp_cache.cc b/sql/sp_cache.cc
index 1da807e9..f67ef421 100644
--- a/sql/sp_cache.cc
+++ b/sql/sp_cache.cc
@@ -78,6 +78,8 @@ private:
/* All routines in this cache */
HASH m_hashtable;
+public:
+ void clear();
}; // class sp_cache
#ifdef HAVE_PSI_INTERFACE
@@ -313,6 +315,10 @@ sp_cache::cleanup()
my_hash_free(&m_hashtable);
}
+void sp_cache::clear()
+{
+ my_hash_reset(&m_hashtable);
+}
void Sp_caches::sp_caches_clear()
{
@@ -321,3 +327,15 @@ void Sp_caches::sp_caches_clear()
sp_cache_clear(&sp_package_spec_cache);
sp_cache_clear(&sp_package_body_cache);
}
+
+void Sp_caches::sp_caches_empty()
+{
+ if (sp_proc_cache)
+ sp_proc_cache->clear();
+ if (sp_func_cache)
+ sp_func_cache->clear();
+ if (sp_package_spec_cache)
+ sp_package_spec_cache->clear();
+ if (sp_package_body_cache)
+ sp_package_body_cache->clear();
+}