1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä
2021-08-18 16:51:52 +03:00
73 changed files with 1277 additions and 454 deletions

View File

@ -445,3 +445,16 @@ pk f1 f2 left(f3, 4) check_row_ts(row_start, row_end)
1 8 8 SHOR HISTORICAL ROW
2 8 8 LONG HISTORICAL ROW
drop table t1;
#
# MDEV-21555 Assertion secondary index is out of sync on delete from versioned table
#
create table t1 (a int, b int as (a + 1) virtual, key(a)) engine=innodb with system versioning;
set foreign_key_checks= off;
insert into t1 (a) values (1), (2);
alter table t1 add foreign key (b) references t1 (a), algorithm=copy;
update t1 set a= null where a = 1;
delete from t1 where a is null;
set foreign_key_checks= on;
delete history from t1;
delete from t1;
drop table t1;

View File

@ -476,4 +476,22 @@ select pk, f1, f2, left(f3, 4), check_row_ts(row_start, row_end) from t1 for sys
# cleanup
drop table t1;
--echo #
--echo # MDEV-21555 Assertion secondary index is out of sync on delete from versioned table
--echo #
create table t1 (a int, b int as (a + 1) virtual, key(a)) engine=innodb with system versioning;
set foreign_key_checks= off;
insert into t1 (a) values (1), (2);
alter table t1 add foreign key (b) references t1 (a), algorithm=copy;
update t1 set a= null where a = 1;
delete from t1 where a is null;
set foreign_key_checks= on;
delete history from t1;
delete from t1;
# cleanup
drop table t1;
--source suite/versioning/common_finish.inc