1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-10372: EXPLAIN fixes for recursive CTEs, including FORMAT=JSON

- Tabular EXPLAIN now prints "RECURSIVE UNION".
- There is a basic implementation of EXPLAIN FORMAT=JSON.
- it produces "recursive_union" JSON struct
- No other details or ANALYZE support, yet.
This commit is contained in:
Sergei Petrunia
2016-08-08 23:02:52 +03:00
parent e1c92a6ca9
commit a2f245e49f
8 changed files with 493 additions and 17 deletions

View File

@ -547,7 +547,12 @@ void Explain_union::print_explain_json(Explain_query *query,
bool started_object= print_explain_json_cache(writer, is_analyze);
writer->add_member("query_block").start_object();
writer->add_member("union_result").start_object();
if (is_recursive_cte)
writer->add_member("recursive_union").start_object();
else
writer->add_member("union_result").start_object();
// using_temporary_table
make_union_table_name(table_name_buffer);
writer->add_member("table_name").add_str(table_name_buffer);