Commit bac6bbab authored by Vicentiu Ciorbaru's avatar Vicentiu Ciorbaru

[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.
parent 29c7aff7
...@@ -331,4 +331,6 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -331,4 +331,6 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL 2 Deleting all rows 1 SIMPLE NULL NULL NULL NULL NULL NULL 2 Deleting all rows
select * from t1; select * from t1;
i i
1
2
drop table t1; drop table t1;
...@@ -347,6 +347,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ...@@ -347,6 +347,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
DBUG_PRINT("debug", ("Trying to use delete_all_rows()")); DBUG_PRINT("debug", ("Trying to use delete_all_rows()"));
query_plan.set_delete_all_rows(maybe_deleted); 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())) if (!(error=table->file->ha_delete_all_rows()))
{ {
...@@ -697,10 +699,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ...@@ -697,10 +699,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
if (error < 0 || if (error < 0 ||
(thd->lex->ignore && !thd->is_error() && !thd->is_fatal_error)) (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; goto send_nothing_and_leave;
}
if (with_select) if (with_select)
result->send_eof(); result->send_eof();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment