Commit 5fc6ad95 authored by Nikita Malyavin's avatar Nikita Malyavin Committed by Sergei Golubchik

MDEV-18921 Server crashes in bitmap_bits_set or bitmap_is_set upon UPDATE...

MDEV-18921 Server crashes in bitmap_bits_set or bitmap_is_set upon UPDATE IGNORE .. FOR PORTION with binary logging

The fix is same as for MDEV-18859: initialize table->rpl_write_set in
FOR PORTION OF case.
parent 7e3e2d06
......@@ -263,4 +263,9 @@ x s e xs xe xs=s and xe=e
1 1999-01-01 2000-01-01 1999-01-01 2000-01-01 1
1 2018-01-01 2018-12-12 2018-01-01 2018-12-12 1
6 2000-01-01 2018-01-01 2000-01-01 2018-01-01 1
# MDEV-18921 Server crashes in bitmap_bits_set or bitmap_is_set upon
# UPDATE IGNORE .. FOR PORTION with binary logging
create or replace table t1 (f int, s date, e date, period for app(s,e));
insert into t1 values (1,'2016-09-21','2019-06-14');
update ignore t1 for portion of app from '2019-03-13' to '2019-03-14' set f = 1;
create or replace database test;
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));
......@@ -150,4 +151,10 @@ update t for portion of apptime from '2000-01-01' to '2018-01-01' set x= x + 5;
--sorted_result
select *, xs=s and xe=e from t;
--echo # MDEV-18921 Server crashes in bitmap_bits_set or bitmap_is_set upon
--echo # UPDATE IGNORE .. FOR PORTION with binary logging
create or replace table t1 (f int, s date, e date, period for app(s,e));
insert into t1 values (1,'2016-09-21','2019-06-14');
update ignore t1 for portion of app from '2019-03-13' to '2019-03-14' set f = 1;
create or replace database test;
......@@ -567,9 +567,14 @@ int mysql_update(THD *thd,
goto err;
if (table_list->has_period())
{
table->use_all_columns();
table->rpl_write_set= table->write_set;
}
else
{
table->mark_columns_needed_for_update();
}
table->update_const_key_parts(conds);
order= simple_remove_const(order, conds);
......
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