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.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 19eabbb053c..12e764ffce3 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -753,7 +753,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
if (table->versioned(VERS_TIMESTAMP) ||
(table_list->has_period() && !portion_of_time_through_update))
- table->file->prepare_for_insert();
+ table->file->prepare_for_insert(1);
+ DBUG_ASSERT(table->file->inited != handler::NONE);
THD_STAGE_INFO(thd, stage_updating);
while (likely(!(error=info.read_record())) && likely(!thd->killed) &&
@@ -1243,7 +1244,7 @@ multi_delete::initialize_tables(JOIN *join)
tbl->prepare_for_position();
if (tbl->versioned(VERS_TIMESTAMP))
- tbl->file->prepare_for_insert();
+ tbl->file->prepare_for_insert(1);
}
else if ((tab->type != JT_SYSTEM && tab->type != JT_CONST) &&
walk == delete_tables)