summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 213013b889c..d7c5d94c2cb 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -347,7 +347,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
DBUG_PRINT("debug", ("Trying to use delete_all_rows()"));
query_plan.set_delete_all_rows(maybe_deleted);
- if (thd->lex->describe || thd->lex->analyze_stmt)
+ if (thd->lex->describe)
goto produce_explain_and_leave;
if (!(error=table->file->ha_delete_all_rows()))
@@ -359,6 +359,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
query_type= THD::STMT_QUERY_TYPE;
error= -1;
deleted= maybe_deleted;
+ query_plan.save_explain_delete_data(thd->mem_root, thd);
goto cleanup;
}
if (error != HA_ERR_WRONG_COMMAND)
@@ -699,10 +700,7 @@ cleanup:
(thd->lex->ignore && !thd->is_error() && !thd->is_fatal_error))
{
if (thd->lex->analyze_stmt)
- {
- error= 0;
goto send_nothing_and_leave;
- }
if (with_select)
result->send_eof();