mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-21147 Assertion `marked_for_read()' upon UPDATE on versioned table via view
"write set" for replication finally got its correct place (mark_columns_per_binlog_row_image()). When done generally in mark_columns_needed_for_update() it affects optimization algorithm. used_key_is_modified, query_plan.using_io_buffer are wrongly set and that leads to wrong prepare_for_keyread() which limits read_set.
This commit is contained in:
@ -285,3 +285,15 @@ with system versioning;
|
||||
insert into t1 (a) values ('foo');
|
||||
update t1 set a = 'bar';
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-21147 Assertion `marked_for_read()' upon UPDATE on versioned table via view
|
||||
#
|
||||
create or replace table t1 (
|
||||
pk int, a char(8), b char(8),
|
||||
primary key (pk)
|
||||
) with system versioning;
|
||||
create or replace view v1 as select * from t1;
|
||||
insert into t1 values (1, null, 'd') , (2, null, 'i') ;
|
||||
update v1 set a= null where b = '';
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
@ -202,4 +202,20 @@ insert into t1 (a) values ('foo');
|
||||
update t1 set a = 'bar';
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-21147 Assertion `marked_for_read()' upon UPDATE on versioned table via view
|
||||
--echo #
|
||||
create or replace table t1 (
|
||||
pk int, a char(8), b char(8),
|
||||
primary key (pk)
|
||||
) with system versioning;
|
||||
|
||||
create or replace view v1 as select * from t1;
|
||||
insert into t1 values (1, null, 'd') , (2, null, 'i') ;
|
||||
update v1 set a= null where b = '';
|
||||
|
||||
# cleanup
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
source suite/versioning/common_finish.inc;
|
||||
|
Reference in New Issue
Block a user