mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-406: ANALYZE $stmt: get ANALYZE work for subqueries
- "ANALYZE $stmt" should discard select's output, but it should still evaluate the output columns (otherwise, subqueries in select list are not executed) - SHOW EXPLAIN's code practice of calling JOIN::save_explain_data() after JOIN::exec() is disastrous for ANALYZE, because it resets all counters after the first execution. It is stopped = "Late" test_if_skip_sort_order() calls explicitly update their part of the query plan. = Also, I had to rewrite I_S optimization to actually have optimization and execution stages.
This commit is contained in:
@@ -345,6 +345,13 @@ int Explain_node::print_explain_for_children(Explain_query *query,
|
||||
}
|
||||
|
||||
|
||||
void Explain_select::replace_table(uint idx, Explain_table_access *new_tab)
|
||||
{
|
||||
delete join_tabs[idx];
|
||||
join_tabs[idx]= new_tab;
|
||||
}
|
||||
|
||||
|
||||
Explain_select::~Explain_select()
|
||||
{
|
||||
if (join_tabs)
|
||||
|
Reference in New Issue
Block a user