summaryrefslogtreecommitdiff
path: root/sql/sql_explain.h
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2015-03-25 18:27:10 +0100
committerSergei Petrunia <psergey@askmonty.org>2015-06-30 23:07:14 +0300
commitc6aee27b73232fc6ba3e8b55adbb0abba4f0171b (patch)
treec996b7f96ff4d063b2112e8b863825a2cff906b2 /sql/sql_explain.h
parent498a264d19f041c36d71e41a32c16ac40a014a3e (diff)
downloadmariadb-git-c6aee27b73232fc6ba3e8b55adbb0abba4f0171b.tar.gz
MDEV-7811: EXPLAIN/ANALYZE FORMAT=JSON should show subquery cache
Diffstat (limited to 'sql/sql_explain.h')
-rw-r--r--sql/sql_explain.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/sql/sql_explain.h b/sql/sql_explain.h
index dd2b5783b41..427553c1088 100644
--- a/sql/sql_explain.h
+++ b/sql/sql_explain.h
@@ -84,9 +84,10 @@ class Explain_query;
class Explain_node : public Sql_alloc
{
public:
- Explain_node(MEM_ROOT *root) :
- connection_type(EXPLAIN_NODE_OTHER),
- children(root)
+ Explain_node(MEM_ROOT *root) :
+ cache_stat(NULL),
+ connection_type(EXPLAIN_NODE_OTHER),
+ children(root)
{}
/* A type specifying what kind of node this is */
enum explain_node_type
@@ -106,10 +107,14 @@ public:
EXPLAIN_NODE_NON_MERGED_SJ /* aka JTBM semi-join */
};
-
virtual enum explain_node_type get_type()= 0;
virtual int get_select_id()= 0;
+ /**
+ expression cache statistics
+ */
+ Expression_cache_stat* cache_stat;
+
/*
How this node is connected to its parent.
(NOTE: EXPLAIN_NODE_NON_MERGED_SJ is set very late currently)
@@ -135,6 +140,7 @@ public:
uint8 explain_flags, bool is_analyze);
void print_explain_json_for_children(Explain_query *query,
Json_writer *writer, bool is_analyze);
+ void print_explain_json_cache(Json_writer *writer, bool is_analyze);
virtual ~Explain_node(){}
};
@@ -221,7 +227,7 @@ public:
members have no info
*/
const char *message;
-
+
/* Expensive constant condition */
Item *exec_const_cond;