summaryrefslogtreecommitdiff
path: root/sql/sql_explain.h
diff options
context:
space:
mode:
authorOleg Smirnov <olernov@gmail.com>2022-02-16 13:03:46 +0700
committerSergei Petrunia <sergey@mariadb.com>2022-04-29 10:48:25 +0300
commita0475cb9ca2b98d5c95f021e6d8c57dcba238397 (patch)
tree4da540e0f95e2e65628597cee8bfdb4bee0de3c5 /sql/sql_explain.h
parentd1a1ad4c28f3e608901406d13db96e1ec1672458 (diff)
downloadmariadb-git-a0475cb9ca2b98d5c95f021e6d8c57dcba238397.tar.gz
MDEV-27021 Add explicit indication of SHOW EXPLAIN/ANALYZE.
1. Add explicit indication that the output is produced by SHOW EXPLAIN/ANALYZE FORMAT=JSON command. 2. Remove useless "r_total_time_ms" field from SHOW ANALYZE FORMAT=JSON output when there is no timed statistics gathered. 3. Add "r_query_time_in_progress_ms" to the output of SHOW ANALYZE FORMAT=JSON.
Diffstat (limited to 'sql/sql_explain.h')
-rw-r--r--sql/sql_explain.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_explain.h b/sql/sql_explain.h
index 94d0f667cf9..f908e2e4221 100644
--- a/sql/sql_explain.h
+++ b/sql/sql_explain.h
@@ -478,7 +478,8 @@ public:
/* Return tabular EXPLAIN output as a text string */
bool print_explain_str(THD *thd, String *out_str, bool is_analyze);
- int print_explain_json(select_result_sink *output, bool is_analyze);
+ int print_explain_json(select_result_sink *output, bool is_analyze,
+ ulonglong query_time_in_progress_ms= 0);
/* If true, at least part of EXPLAIN can be printed */
bool have_query_plan() { return insert_plan || upd_del_plan|| get_node(1) != NULL; }