summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2019-07-23 13:37:18 +0300
committerAleksey Midenkov <midenok@gmail.com>2019-07-25 21:11:06 +0300
commit1a73444d577ee54ac3ecf752e8436091e932d212 (patch)
tree9a0a7008606c9af4af925e8de2dc0466770b59a0 /sql/sql_delete.cc
parentf3eb82f048d342c11fc3869eca2e6faed9a4835d (diff)
downloadmariadb-git-1a73444d577ee54ac3ecf752e8436091e932d212.tar.gz
Cleanups: DELETE HISTORY [MDEV-19814]
* Made make_versioned_*() proxies inline; * Renamed truncate_history to delete_history Part of: MDEV-19814 Server crash in row_upd_del_mark_clust_rec or Assertion `update->n_fields < ulint(table->n_cols + table->n_v_cols)' failed in upd_node_t::make_versioned_helper
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 0ab80fe7cb8..d31fc127e3c 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -305,8 +305,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
THD_STAGE_INFO(thd, stage_init_update);
- bool truncate_history= table_list->vers_conditions.is_set();
- if (truncate_history)
+ bool delete_history= table_list->vers_conditions.is_set();
+ if (delete_history)
{
if (table_list->is_view_or_derived())
{
@@ -696,7 +696,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
while (!(error=info.read_record()) && !thd->killed &&
! thd->is_error())
{
- if (record_should_be_deleted(thd, table, select, explain, truncate_history))
+ if (record_should_be_deleted(thd, table, select, explain, delete_history))
{
table->file->position(table->record[0]);
if (unlikely((error=
@@ -727,10 +727,10 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
{
if (delete_while_scanning)
delete_record= record_should_be_deleted(thd, table, select, explain,
- truncate_history);
+ delete_history);
if (delete_record)
{
- if (!truncate_history && table->triggers &&
+ if (!delete_history && table->triggers &&
table->triggers->process_triggers(thd, TRG_EVENT_DELETE,
TRG_ACTION_BEFORE, FALSE))
{
@@ -748,7 +748,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
if (likely(!error))
{
deleted++;
- if (!truncate_history && table->triggers &&
+ if (!delete_history && table->triggers &&
table->triggers->process_triggers(thd, TRG_EVENT_DELETE,
TRG_ACTION_AFTER, FALSE))
{