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

MDEV-17568: LATERAL DERIVED is not clearly visible in EXPLAIN FORMAT=JSON

Make LATERAL DERIVED tables visible in EXPLAIN FORMAT=JSON output.
This commit is contained in:
Sergei Petrunia
2020-05-06 23:44:34 +03:00
parent 8648b9bed8
commit d01d94d77b
4 changed files with 17 additions and 0 deletions

View File

@ -1756,6 +1756,11 @@ void Explain_table_access::print_explain_json(Explain_query *query,
/* This is a derived table. Print its contents here */
writer->add_member("materialized").start_object();
Explain_node *node= query->get_node(derived_select_number);
if (node->get_type() == Explain_node::EXPLAIN_SELECT &&
((Explain_select*)node)->is_lateral)
{
writer->add_member("lateral").add_ll(1);
}
node->print_explain_json(query, writer, is_analyze);
writer->end_object();
}