Commit 7e3e2d06 authored by Nikita Malyavin's avatar Nikita Malyavin Committed by Sergei Golubchik

MDEV-18859 Server crashes in bitmap_bits_set / pack_row /...

MDEV-18859 Server crashes in bitmap_bits_set / pack_row / THD::binlog_write_row upon DELETE .. FOR PORTION with binary logging

rpl_write_set is initialized in TABLE::mark_columns_per_binlog_row_image.
Since we just call use_all_columns for PORTION OF case, no need in
column marking logic here. Instead, initialize table->rpl_write_set in
place.
parent 04055060
source suite/period/engines.inc; source suite/period/engines.inc;
source include/have_log_bin.inc;
create or replace table t (id int, s date, e date, period for apptime(s,e)); create or replace table t (id int, s date, e date, period for apptime(s,e));
......
...@@ -718,9 +718,14 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ...@@ -718,9 +718,14 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
goto got_error; goto got_error;
if (table_list->has_period()) if (table_list->has_period())
{
table->use_all_columns(); table->use_all_columns();
table->rpl_write_set= table->write_set;
}
else else
{
table->mark_columns_needed_for_delete(); table->mark_columns_needed_for_delete();
}
if ((table->file->ha_table_flags() & HA_CAN_FORCE_BULK_DELETE) && if ((table->file->ha_table_flags() & HA_CAN_FORCE_BULK_DELETE) &&
!table->prepare_triggers_for_delete_stmt_or_event()) !table->prepare_triggers_for_delete_stmt_or_event())
......
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