From 1ec399ce03d3adb5b31b63673bbad424b48f4f2b Mon Sep 17 00:00:00 2001 From: Sergey Petrunya <psergey@askmonty.org> Date: Tue, 15 Oct 2013 00:30:32 +0400 Subject: [PATCH] Code cleanup. --- sql/sql_lex.cc | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 09cb8f06af..60ab090ddf 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -4250,29 +4250,6 @@ int st_select_lex_unit::save_union_explain(Explain_query *output) SELECT_LEX *first= first_select(); Explain_union *eu= new (output->mem_root) Explain_union; - /* - TODO: The following code should be eliminated. If we have a capability to - save Query Plan Footprints, we should just save them, and never need to - print "query plan already deleted". - */ - if (first && !first->next_select() && !first->join) - { - /* - If there is only one child, 'first', and it has join==NULL, emit "not in - EXPLAIN state" error. - */ - const char *msg="Query plan already deleted"; - first->set_explain_type(TRUE/* on_the_fly */); - - Explain_select *explain= new (output->mem_root)Explain_select; - explain->select_id= first->select_number; - explain->select_type= first->type; - explain->message= msg; - output->add_node(explain); - eu->add_select(explain->select_id); - return 0; - } - for (SELECT_LEX *sl= first; sl; sl= sl->next_select()) eu->add_select(sl->select_number); -- 2.30.9