mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-3798: EXPLAIN UPDATE/DELETE
Update the SHOW EXPLAIN code to work with the new architecture (part#1): Before, SHOW EXPLAIN operated on real query plan structures, which meant it had to check when SELECTs are created/deleted. SELECTs would call apc_target->enable() when they got a query plan and disable() when their query plan was deleted. Now, Explain data structure becomes available at once (and we call apc_target->enable()) and then it stays until it is deleted (when that happens, we call apc_target->disable()).
This commit is contained in:
@@ -4276,11 +4276,15 @@ int st_select_lex_unit::save_union_explain(Explain_query *output)
|
||||
for (SELECT_LEX *sl= first; sl; sl= sl->next_select())
|
||||
eu->add_select(sl->select_number);
|
||||
|
||||
eu->fake_select_type= "UNION RESULT";
|
||||
eu->using_filesort= test(global_parameters->order_list.first);
|
||||
|
||||
// Save the UNION node
|
||||
output->add_node(eu);
|
||||
|
||||
eu->fake_select_type= "UNION RESULT";
|
||||
eu->using_filesort= test(global_parameters->order_list.first);
|
||||
if (eu->get_select_id() == 1)
|
||||
output->query_plan_ready();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user