summaryrefslogtreecommitdiff
path: root/sql/sql_expression_cache.cc
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2015-07-01 20:03:29 +0300
committerSergei Petrunia <psergey@askmonty.org>2015-07-01 20:03:29 +0300
commit9d2aa2b3093e315f02e42943589f47447c67bbd8 (patch)
treef2f73397e7d6b26e76971e702fbd6a6a01b95521 /sql/sql_expression_cache.cc
parentc6aee27b73232fc6ba3e8b55adbb0abba4f0171b (diff)
downloadmariadb-git-9d2aa2b3093e315f02e42943589f47447c67bbd8.tar.gz
MDEV-7811: EXPLAIN/ANALYZE FORMAT=JSON should show subquery cache
Fixes over the original patch: - Fix variable/class/other names - Fix the JSON output to be in line with the output of other JSON constructs we produce
Diffstat (limited to 'sql/sql_expression_cache.cc')
-rw-r--r--sql/sql_expression_cache.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/sql_expression_cache.cc b/sql/sql_expression_cache.cc
index bda0aaafebe..cc922c3bcfe 100644
--- a/sql/sql_expression_cache.cc
+++ b/sql/sql_expression_cache.cc
@@ -43,7 +43,7 @@ ulong subquery_cache_miss, subquery_cache_hit;
Expression_cache_tmptable::Expression_cache_tmptable(THD *thd,
List<Item> &dependants,
Item *value)
- :cache_table(NULL), table_thd(thd), stat(NULL), items(dependants), val(value),
+ :cache_table(NULL), table_thd(thd), tracker(NULL), items(dependants), val(value),
hit(0), miss(0), inited (0)
{
DBUG_ENTER("Expression_cache_tmptable::Expression_cache_tmptable");
@@ -61,9 +61,9 @@ void Expression_cache_tmptable::disable_cache()
cache_table->file->ha_index_end();
free_tmp_table(table_thd, cache_table);
cache_table= NULL;
- flush_stat();
- if (stat)
- stat->cache= NULL;
+ update_tracker();
+ if (tracker)
+ tracker->cache= NULL;
}
@@ -167,7 +167,7 @@ void Expression_cache_tmptable::init()
goto error;
}
- flush_stat();
+ update_tracker();
DBUG_VOID_RETURN;
error:
@@ -186,8 +186,8 @@ Expression_cache_tmptable::~Expression_cache_tmptable()
disable_cache();
else
{
- flush_stat();
- stat= NULL;
+ update_tracker();
+ tracker= NULL;
}
}
@@ -334,5 +334,5 @@ void Expression_cache_tmptable::print(String *str, enum_query_type query_type)
}
-const char *Expression_cache_stat::state_str[3]=
-{"UNINITIALYZED", "DISABLED", "ENABLED"};
+const char *Expression_cache_tracker::state_str[3]=
+{"uninitialized", "disabled", "enabled"};