summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorVicentiu Ciorbaru <vicentiu@mariadb.org>2015-05-19 12:04:09 +0000
committerVicentiu Ciorbaru <vicentiu@mariadb.org>2015-05-19 12:04:09 +0000
commitbac6bbab804b6e5428fe9413069148c1dd701a3e (patch)
treebf3723c24de9b2fda736b139932bfff5e7cf92e8 /sql/sql_delete.cc
parent29c7aff76784ff2b8329387f69c73e7282f28b2a (diff)
downloadmariadb-git-bac6bbab804b6e5428fe9413069148c1dd701a3e.tar.gz
[MDEV-8063]: Fix incorrect commit.
The previous commit did not contain the reviewed changes and introduced a behaviour problem for the explain statement. This fixes the issue.
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index cfb44de5222..d7c5d94c2cb 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -347,6 +347,8 @@ 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)
+ goto produce_explain_and_leave;
if (!(error=table->file->ha_delete_all_rows()))
{
@@ -697,10 +699,8 @@ cleanup:
if (error < 0 ||
(thd->lex->ignore && !thd->is_error() && !thd->is_fatal_error))
{
- if (thd->lex->describe || thd->lex->analyze_stmt)
- {
+ if (thd->lex->analyze_stmt)
goto send_nothing_and_leave;
- }
if (with_select)
result->send_eof();