summaryrefslogtreecommitdiff
path: root/sql/sql_expression_cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_expression_cache.h')
-rw-r--r--sql/sql_expression_cache.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_expression_cache.h b/sql/sql_expression_cache.h
index 031773adb9f..9c618a5ae9b 100644
--- a/sql/sql_expression_cache.h
+++ b/sql/sql_expression_cache.h
@@ -83,7 +83,11 @@ public:
cache(c), hit(0), miss(0), state(UNINITED)
{}
+private:
+ // This can be NULL if the cache is already deleted
Expression_cache *cache;
+
+public:
ulong hit, miss;
enum expr_cache_state state;
@@ -91,6 +95,7 @@ public:
void set(ulong h, ulong m, enum expr_cache_state s)
{hit= h; miss= m; state= s;}
+ void detach_from_cache() { cache= NULL; }
void fetch_current_stats()
{
if (cache)