summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-11-10 16:12:45 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-11-10 16:12:45 +0200
commita48aa0cd569eda88bef98ed4abe41b0b570fcd51 (patch)
tree6008b19aabfe0554432c87614d1022594f08fc5f /sql/sql_delete.cc
parent8409f721ffe2d91b11d3fc03c6872ff57051bbf8 (diff)
parent386e5d476e9bf8f216c760c9076ae0ecdc99054d (diff)
downloadmariadb-git-a48aa0cd569eda88bef98ed4abe41b0b570fcd51.tar.gz
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index c880374f9ab..d0fc422c2f9 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -273,6 +273,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
if (open_and_lock_tables(thd, table_list, TRUE, 0))
DBUG_RETURN(TRUE);
+ THD_STAGE_INFO(thd, stage_init_update);
if (mysql_handle_list_of_derived(thd->lex, table_list, DT_MERGE_FOR_INSERT))
DBUG_RETURN(TRUE);
if (mysql_handle_list_of_derived(thd->lex, table_list, DT_PREPARE))
@@ -289,7 +290,6 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
table_list->view_db.str, table_list->view_name.str);
DBUG_RETURN(TRUE);
}
- THD_STAGE_INFO(thd, stage_init);
table->map=1;
query_plan.select_lex= &thd->lex->select_lex;
query_plan.table= table;
@@ -556,7 +556,6 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
goto got_error;
init_ftfuncs(thd, select_lex, 1);
- THD_STAGE_INFO(thd, stage_updating);
if (table->prepare_triggers_for_delete_stmt_or_event())
{
@@ -588,6 +587,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
deltempfile= new (thd->mem_root) Unique (refpos_order_cmp, table->file,
table->file->ref_length,
MEM_STRIP_BUF_SIZE);
+
+ THD_STAGE_INFO(thd, stage_searching_rows_for_update);
while (!(error=info.read_record()) && !thd->killed &&
! thd->is_error())
{
@@ -613,6 +614,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
delete_record= true;
}
+ THD_STAGE_INFO(thd, stage_updating);
while (!(error=info.read_record()) && !thd->killed &&
! thd->is_error())
{