Commit 8a165d7c authored by Nikita Malyavin's avatar Nikita Malyavin Committed by Sergei Golubchik

follow-up MDEV-30430: fix versioning.rpl

Don't skip row_end if it wasn't set explicitly.

Also another segfault was caused by accessing rpl_write_set on slave during
the row update/delete.
The reason was a default_column_bitmaps() call, which also sets
rpl_write_set to NULL.
Previously, the related behavior was changed in commit afd3ee97ad, where
one such call was removed from Update_rows_log_event::do_exec_row, but the
same one was mistakenly left in Delete_rows_log_event. Now it's also
removed.
parent 43cb98b4
......@@ -7091,7 +7091,9 @@ static bool record_compare(TABLE *table, bool vers_from_plain= false)
*/
if (!all_values_set)
{
if (!f->has_explicit_value())
if (!f->has_explicit_value() &&
/* Don't skip row_end if replicating unversioned -> versioned */
!(vers_from_plain && table->vers_end_field() == f))
continue;
if (f->is_null() != f->is_null(table->s->rec_buff_length))
goto record_compare_differ;
......@@ -7809,7 +7811,6 @@ int Delete_rows_log_event::do_exec_row(rpl_group_info *rgi)
{
error= m_table->file->ha_delete_row(m_table->record[0]);
}
m_table->default_column_bitmaps();
}
if (invoke_triggers && likely(!error) &&
unlikely(process_triggers(TRG_EVENT_DELETE, TRG_ACTION_AFTER, FALSE)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment