mirror of
https://github.com/MariaDB/server.git
synced 2025-11-25 17:25:02 +03:00
Merge 10.3 into 10.4
This commit is contained in:
@@ -642,3 +642,45 @@ create or replace table t1 (f1 int) with system versioning;
|
||||
alter table t1 drop system versioning, add f2 int with system versioning;
|
||||
ERROR HY000: Table `t1` is not system-versioned
|
||||
drop table t1;
|
||||
# MDEV-16490 It's possible to make a system versioned table without any versioning field
|
||||
set @@system_versioning_alter_history=keep;
|
||||
create or replace table t (a int) with system versioning engine=innodb;
|
||||
alter table t change column a a int without system versioning;
|
||||
ERROR HY000: Table `t` must have at least one versioned column
|
||||
alter table t
|
||||
change column a a int without system versioning,
|
||||
add column b int with system versioning;
|
||||
show create table t;
|
||||
Table Create Table
|
||||
t CREATE TABLE `t` (
|
||||
`a` int(11) DEFAULT NULL WITHOUT SYSTEM VERSIONING,
|
||||
`b` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||
alter table t
|
||||
change column a new_a int,
|
||||
drop system versioning;
|
||||
show create table t;
|
||||
Table Create Table
|
||||
t CREATE TABLE `t` (
|
||||
`new_a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
alter table t add system versioning;
|
||||
alter table t change column new_a a int without system versioning;
|
||||
show create table t;
|
||||
Table Create Table
|
||||
t CREATE TABLE `t` (
|
||||
`a` int(11) DEFAULT NULL WITHOUT SYSTEM VERSIONING,
|
||||
`b` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||
alter table t
|
||||
add column c int,
|
||||
change column c c int without system versioning,
|
||||
change column b b int without system versioning;
|
||||
ERROR HY000: Table `t` must have at least one versioned column
|
||||
alter table t
|
||||
add column c int without system versioning,
|
||||
change column c c int,
|
||||
change column b b int without system versioning;
|
||||
drop database test;
|
||||
create database test;
|
||||
|
||||
@@ -527,3 +527,13 @@ row_end datetime(6) generated always as row end,
|
||||
period for system_time(row_start, row_end)
|
||||
) with system versioning;
|
||||
ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t`
|
||||
# MDEV-16490 It's possible to make a system versioned table without any versioning field
|
||||
create or replace table t1 (x int without system versioning)
|
||||
with system versioning
|
||||
select 1 as y;
|
||||
create or replace table t1 (x int without system versioning)
|
||||
with system versioning
|
||||
select 1 as x;
|
||||
ERROR HY000: Table `t1` must have at least one versioned column
|
||||
drop database test;
|
||||
create database test;
|
||||
|
||||
Reference in New Issue
Block a user