summaryrefslogtreecommitdiff
path: root/sql/sql_show.h
diff options
context:
space:
mode:
authorOleg Smirnov <olernov@gmail.com>2022-01-11 20:25:11 +0300
committerSergei Petrunia <sergey@mariadb.com>2022-04-29 10:47:03 +0300
commit328684833b3e6e8fad5a71a4c6aa1676cb6c6e37 (patch)
tree74982c279a4976aff3eff766d8deb37204994abf /sql/sql_show.h
parent51b28b24ca3a33a3a9b2a844c6c8a94df1bad253 (diff)
downloadmariadb-git-328684833b3e6e8fad5a71a4c6aa1676cb6c6e37.tar.gz
MDEV-10000 Add EXPLAIN [FORMAT=JSON] FOR CONNECTION syntax support
EXPLAIN FOR CONNECTION is a MySQL-compatible syntax for SHOW EXPLAIN. This commit also adds support for FORMAT=JSON to SHOW EXPLAIN, so the possible options to get JSON-formatted output are: - SHOW EXPLAIN FORMAT=JSON FOR $con - EXPLAIN FORMAT=JSON FOR CONNECTION $con
Diffstat (limited to 'sql/sql_show.h')
-rw-r--r--sql/sql_show.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_show.h b/sql/sql_show.h
index 3d7a4d1146c..ccdfca50ac2 100644
--- a/sql/sql_show.h
+++ b/sql/sql_show.h
@@ -164,6 +164,12 @@ public:
THD *target_thd; /* thd that we're running SHOW EXPLAIN for */
THD *request_thd; /* thd that run SHOW EXPLAIN command */
+ /*
+ Set to TRUE if you need the result in JSON format,
+ FALSE - in traditional tabular
+ */
+ bool is_json_format= false;
+
/* If true, there was some error when producing EXPLAIN output. */
bool failed_to_produce;