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

Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä
2019-09-12 12:16:40 +03:00
51 changed files with 982 additions and 248 deletions

View File

@@ -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;