summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc
index b4de9732b59..14e14968278 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -7554,6 +7554,19 @@ bool Item_cache_wrapper::set_cache(THD *thd)
DBUG_RETURN(expr_cache == NULL);
}
+Expression_cache_stat* Item_cache_wrapper::set_stat(MEM_ROOT *mem_root)
+{
+ if (expr_cache)
+ {
+ Expression_cache_stat* stat=
+ new(mem_root) Expression_cache_stat(expr_cache);
+ if (stat)
+ ((Expression_cache_tmptable *)expr_cache)->set_stat(stat);
+ return stat;
+ }
+ return NULL;
+}
+
/**
Check if the current values of the parameters are in the expression cache