mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '10.6' into 10.9
This commit is contained in:
@@ -3603,7 +3603,10 @@ Gtid_log_event::Gtid_log_event(THD *thd_arg, uint64 seq_no_arg,
|
||||
thd_arg->transaction->all.has_created_dropped_temp_table() ||
|
||||
thd_arg->transaction->all.trans_executed_admin_cmd())
|
||||
flags2|= FL_DDL;
|
||||
else if (is_transactional && !is_tmp_table)
|
||||
else if (is_transactional && !is_tmp_table &&
|
||||
!(thd_arg->transaction->all.modified_non_trans_table &&
|
||||
thd->variables.binlog_direct_non_trans_update == 0 &&
|
||||
!thd->is_current_stmt_binlog_format_row()))
|
||||
flags2|= FL_TRANSACTIONAL;
|
||||
if (!(thd_arg->variables.option_bits & OPTION_RPL_SKIP_PARALLEL))
|
||||
flags2|= FL_ALLOW_PARALLEL;
|
||||
@@ -8778,6 +8781,11 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
|
||||
return error;
|
||||
}
|
||||
|
||||
const bool history_change= m_table->versioned() ?
|
||||
!m_table->vers_end_field()->is_max() : false;
|
||||
TABLE_LIST *tl= m_table->pos_in_table_list;
|
||||
uint8 trg_event_map_save= tl->trg_event_map;
|
||||
|
||||
/*
|
||||
This is the situation after locating BI:
|
||||
|
||||
@@ -8843,9 +8851,17 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (m_vers_from_plain && m_table->versioned(VERS_TIMESTAMP))
|
||||
m_table->vers_update_fields();
|
||||
if (m_table->versioned())
|
||||
{
|
||||
if (m_vers_from_plain && m_table->versioned(VERS_TIMESTAMP))
|
||||
m_table->vers_update_fields();
|
||||
if (!history_change && !m_table->vers_end_field()->is_max())
|
||||
{
|
||||
tl->trg_event_map|= trg2bit(TRG_EVENT_DELETE);
|
||||
}
|
||||
}
|
||||
error= m_table->file->ha_update_row(m_table->record[1], m_table->record[0]);
|
||||
tl->trg_event_map= trg_event_map_save;
|
||||
if (unlikely(error == HA_ERR_RECORD_IS_THE_SAME))
|
||||
error= 0;
|
||||
if (m_vers_from_plain && m_table->versioned(VERS_TIMESTAMP))
|
||||
|
Reference in New Issue
Block a user