summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2014-06-26 20:12:18 +0400
committerSergei Petrunia <psergey@askmonty.org>2014-06-26 20:12:18 +0400
commitbe885ebe8c3df78d090c2ad25772959fc2ae9fc9 (patch)
tree0227056380e48fba6876dc12556f577be59888da /sql/sql_parse.cc
parentc6be74458fd478b019ac357371d5aee8925fe012 (diff)
downloadmariadb-git-be885ebe8c3df78d090c2ad25772959fc2ae9fc9.tar.gz
Code cleanup, more tests.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index e9be2b284a9..78c98d2d7be 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -5256,11 +5256,9 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
}
else
{
- select_result *save_result;
Protocol *save_protocol;
if (lex->analyze_stmt)
{
- save_result= result;
result= new select_send_analyze();
save_protocol= thd->protocol;
thd->protocol= new Protocol_discard(thd);
@@ -5277,16 +5275,10 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
if (lex->analyze_stmt)
{
- result= save_result;
- if (!result && !(result= new select_send()))
- return 1;
delete thd->protocol;
thd->protocol= save_protocol;
if (!res)
- thd->lex->explain->send_explain(thd);
-
- if (result != lex->result)
- delete result;
+ res= thd->lex->explain->send_explain(thd);
}
}
}