diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2017-11-13 11:06:18 +0300 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2017-11-13 19:09:46 +0300 |
commit | 497c6add88edae9c7ec6d6d840c0ed65adc016be (patch) | |
tree | 92eb05976137821fcdf0caf556495a5b55436db0 /sql/sql_delete.cc | |
parent | d8d725101992d50b00edf149e7ccd7f720b850dc (diff) | |
parent | a48aa0cd569eda88bef98ed4abe41b0b570fcd51 (diff) | |
download | mariadb-git-497c6add88edae9c7ec6d6d840c0ed65adc016be.tar.gz |
System Versioning pre1.0
Merge branch '10.3' into trunk
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 39502a6637c..ae9322ec256 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -292,6 +292,8 @@ 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); + bool truncate_history= table_list->vers_conditions; if (truncate_history) { @@ -325,7 +327,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; @@ -593,7 +594,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()) { @@ -625,6 +625,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()) { @@ -650,6 +652,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()) { |