1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Merge branch '10.6' into 10.11

This commit is contained in:
Sergei Golubchik
2023-12-17 16:56:38 +01:00
629 changed files with 27336 additions and 4573 deletions

View File

@@ -787,6 +787,68 @@ modify row_start varchar(8);
ERROR HY000: PERIOD FOR SYSTEM_TIME must use columns `row_start` and `row_end`
drop table t1;
#
# MDEV-20545 Assertion (col.vers_sys_end()) upon inplace ALTER with virtual columns
#
create table t1 (
a int,
va int as (a) virtual,
b int,
vb int as (b) virtual,
c int,
vc int as (c) virtual,
d int,
e int,
index(va)
) engine=innodb with system versioning;
replace into t1 () values (),();
set statement system_versioning_alter_history=keep for alter table t1 drop e;
alter table t1 algorithm=inplace, drop system versioning;
drop table t1;
#
# MDEV-20765 Assertion (type.vers_sys_end()) upon inplace ALTER with virtual columns
#
create table t1 (
a int,
b int as (a) virtual,
c int,
d int as (c) virtual,
e int,
f int as (e) virtual,
g int,
h int,
i int,
index(d),
key(h),
foreign key (g) references t1 (h)
) engine=innodb with system versioning;
set system_versioning_alter_history= keep;
alter table t1 drop column i;
insert into t1 (g,h) values (1,1);
drop table t1;
#
# MDEV-29034 Assertion (o->ind == vers_start) upon inplace ALTER with virtual columns
#
create table b (
pk integer auto_increment,
col_int_key integer,
col_varchar_key varchar(1),
o bit, n bit,
h float as ( n + 2 ) virtual,
v bit,
primary key (pk),
key (col_varchar_key, col_int_key)
) engine = innodb;
set `system_versioning_alter_history`= keep;
alter table `b` add system versioning;
alter table `b` add column if not exists ( w bit, v serial );
Warnings:
Note 1060 Duplicate column name 'v'
alter table `b` add column if not exists ( p bit );
drop table `b`;
#
# End of 10.4 tests
#
#
# MDEV-21941 RENAME doesn't work for system time or period fields
#
create or replace table t1 (a int) with system versioning;
@@ -809,4 +871,6 @@ t1 CREATE TABLE `t1` (
PERIOD FOR SYSTEM_TIME (`x`, `y`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
drop table t1;
#
# End of 10.5 tests
#

View File

@@ -443,7 +443,7 @@ create or replace table t1 (x int) with system versioning;
select * from t1 for system_time as of current_timestamp;
x
select * from t1 for system_time as of now;
ERROR 42S22: Unknown column 'now' in 'FOR SYSTEM_TIME'
ERROR HY000: Illegal parameter data type now for operation 'FOR SYSTEM_TIME'
### Issue #405, NATURAL JOIN failure
create or replace table t1 (a int) with system versioning;
create or replace table t2 (b int);
@@ -708,3 +708,12 @@ No A B C D
33 1 1 1 1
34 1 1 1 1
SET GLOBAL innodb_stats_persistent = @saved_stats_persistent;
#
# MDEV-32082 Server crash in find_field_in_table
#
create table t0 (c0 int) with system versioning;
select x0 from (
select c0 x0 from t0
) for system_time as of nowasdf deriv;
ERROR HY000: Illegal parameter data type nowasdf for operation 'FOR SYSTEM_TIME'
drop table t0;