1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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
This commit is contained in:
Aleksey Midenkov
2019-07-23 13:37:18 +03:00
parent f3eb82f048
commit 1a73444d57
3 changed files with 26 additions and 31 deletions

View File

@ -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))
{