1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 10.8 into 10.9

This commit is contained in:
Marko Mäkelä
2023-01-10 14:50:58 +02:00
197 changed files with 3244 additions and 2320 deletions

View File

@@ -266,6 +266,8 @@ select * from t;
select * from t for system_time all;
insert into t values (4, 0);
select * from t for system_time all;
alter table t add c int, drop system versioning;
select * from t;
create or replace table t (a int) with system versioning;
insert into t values (1), (2), (3);

View File

@@ -2,6 +2,9 @@
--source include/have_partition.inc
--source suite/versioning/engines.inc
set @saved_frequency= @@global.innodb_purge_rseg_truncate_frequency;
set global innodb_purge_rseg_truncate_frequency= 1;
call mtr.add_suppression("need more HISTORY partitions");
create table t (a int);
@@ -191,6 +194,29 @@ select * from t1;
drop prepare stmt;
drop table t1;
--echo #
--echo # MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY
--echo #
create table t1 (a integer, c0 varchar(255), fulltext key (c0))
with system versioning engine innodb;
set system_versioning_alter_history= keep;
alter table t1 drop system versioning;
alter table t1 add system versioning;
insert into t1 values (1, 'politician');
update t1 set c0= 'criminal';
--source suite/innodb/include/wait_all_purged.inc
delete history from t1;
drop table t1;
create table t1 (id int primary key, ftx varchar(255))
with system versioning engine innodb;
insert into t1 values (1, 'c');
delete from t1;
alter table t1 add fulltext key(ftx);
drop table t1;
set global innodb_purge_rseg_truncate_frequency= @saved_frequency;
--echo #
--echo # MDEV-28201 Server crashes upon SHOW ANALYZE/EXPLAIN FORMAT=JSON
--echo #
@@ -204,6 +230,8 @@ DELETE HISTORY FROM v1;
DROP VIEW v1;
DROP TABLE t1;
--echo # End of 10.4 tests
--echo #
--echo # MDEV-17554 Auto-create new partition for system versioned tables with history partitioned by INTERVAL/LIMIT
--echo #
@@ -218,4 +246,6 @@ set timestamp= default;
show create table t;
drop table t;
--echo # End of 10.9 tests
--source suite/versioning/common_finish.inc

View File

@@ -478,6 +478,39 @@ select pk, f1, f2, left(f3, 4), check_row_ts(row_start, row_end) from t1 for sys
# cleanup
drop table t1;
--echo # Shorter case for clustered index (MDEV-25004)
create table t1 (
y int primary key, r int, f int, key (r),
foreign key (f) references t1 (r) on delete set null)
with system versioning engine innodb;
insert into t1 values (1, 6, 6), (2, 6, 6);
delete from t1;
select *, check_row_ts(row_start, row_end) from t1 for system_time all;
drop tables t1;
--echo # Secondary unique index
create table t1 (
y int unique null, r int, f int, key (r),
foreign key (f) references t1 (r) on delete set null)
with system versioning engine innodb;
insert into t1 values (1, 6, 6), (2, 6, 6);
delete from t1;
select *, check_row_ts(row_start, row_end) from t1 for system_time all;
drop tables t1;
--echo # Non-unique index cannot be fixed because it does not trigger duplicate error
create table t1 (
y int, r int, f int, key (y), key (r),
foreign key (f) references t1 (r) on delete set null)
with system versioning engine innodb;
insert into t1 values (1, 6, 6), (2, 6, 6);
delete from t1;
select *, check_row_ts(row_start, row_end) from t1 for system_time all;
drop tables t1;
--echo #
--echo # MDEV-21555 Assertion secondary index is out of sync on delete from versioned table
--echo #