mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-26928 Column-inclusive WITH SYSTEM VERSIONING doesn't work with explicit system fields
versioning_fields flag indicates that any columns were specified WITH SYSTEM VERSIONING. In that case we imply WITH SYSTEM VERSIONING for the whole table and WITHOUT SYSTEM VERSIONING for the other columns.
This commit is contained in:
@ -599,3 +599,28 @@ t1 CREATE TABLE `t1` (
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-26928 Column-inclusive WITH SYSTEM VERSIONING doesn't work with explicit system fields
|
||||
#
|
||||
create or replace table t1 (x int, y int with system versioning);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`x` int(11) DEFAULT NULL WITHOUT SYSTEM VERSIONING,
|
||||
`y` int(11) DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||
create or replace table t1 (
|
||||
x int, y int with system versioning,
|
||||
row_start timestamp(6) as row start,
|
||||
row_end timestamp(6) as row end,
|
||||
period for system_time(row_start, row_end));
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`x` int(11) DEFAULT NULL WITHOUT SYSTEM VERSIONING,
|
||||
`y` int(11) DEFAULT NULL,
|
||||
`row_start` timestamp(6) GENERATED ALWAYS AS ROW START WITHOUT SYSTEM VERSIONING,
|
||||
`row_end` timestamp(6) GENERATED ALWAYS AS ROW END WITHOUT SYSTEM VERSIONING,
|
||||
PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||
drop table t1;
|
||||
|
@ -451,3 +451,20 @@ show index from t1;
|
||||
--replace_result $default_engine DEFAULT_ENGINE
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-26928 Column-inclusive WITH SYSTEM VERSIONING doesn't work with explicit system fields
|
||||
--echo #
|
||||
create or replace table t1 (x int, y int with system versioning);
|
||||
--replace_result $default_engine DEFAULT_ENGINE
|
||||
show create table t1;
|
||||
|
||||
create or replace table t1 (
|
||||
x int, y int with system versioning,
|
||||
row_start timestamp(6) as row start,
|
||||
row_end timestamp(6) as row end,
|
||||
period for system_time(row_start, row_end));
|
||||
--replace_result $default_engine DEFAULT_ENGINE
|
||||
show create table t1;
|
||||
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user