mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
SQL: table with duplicate ROW START/END columns [fixes #369]
This commit is contained in:
committed by
Aleksey Midenkov
parent
84b718ae70
commit
03b54a6b8a
@ -37,11 +37,10 @@ t1 CREATE TABLE `t1` (
|
||||
create or replace table t1 (
|
||||
x3 int unsigned,
|
||||
Sys_start SYS_TRX_TYPE generated always as row start,
|
||||
Sys_start2 SYS_TRX_TYPE generated always as row start,
|
||||
Sys_end SYS_TRX_TYPE generated always as row end,
|
||||
period for system_time (Sys_start, Sys_end)
|
||||
period for system_time (x, Sys_end)
|
||||
) with system versioning;
|
||||
ERROR HY000: PERIOD FOR SYSTEM_TIME must use columns `Sys_start2` and `Sys_end`
|
||||
ERROR HY000: PERIOD FOR SYSTEM_TIME must use columns `Sys_start` and `Sys_end`
|
||||
create or replace table t1 (
|
||||
x4 int unsigned,
|
||||
Sys_start SYS_TRX_TYPE generated always as row start,
|
||||
@ -53,10 +52,9 @@ create or replace table t1 (
|
||||
x5 int unsigned,
|
||||
Sys_start SYS_TRX_TYPE generated always as row start,
|
||||
Sys_end SYS_TRX_TYPE generated always as row end,
|
||||
Sys_end2 SYS_TRX_TYPE generated always as row end,
|
||||
period for system_time (Sys_start, Sys_end)
|
||||
period for system_time (Sys_start, x)
|
||||
) with system versioning;
|
||||
ERROR HY000: PERIOD FOR SYSTEM_TIME must use columns `Sys_start` and `Sys_end2`
|
||||
ERROR HY000: PERIOD FOR SYSTEM_TIME must use columns `Sys_start` and `Sys_end`
|
||||
create or replace table t1 (
|
||||
x6 int unsigned,
|
||||
period for system_time (Sys_start, Sys_end)
|
||||
@ -66,7 +64,6 @@ create or replace table t1 (
|
||||
x7 int unsigned,
|
||||
Sys_start SYS_TRX_TYPE generated always as row start,
|
||||
Sys_end SYS_TRX_TYPE generated always as row end,
|
||||
Sys_end2 SYS_TRX_TYPE generated always as row end,
|
||||
period for system_time (Sys_start, Sys_end)
|
||||
);
|
||||
ERROR HY000: Wrong parameters for `t1`: missing 'WITH SYSTEM VERSIONING'
|
||||
@ -302,5 +299,13 @@ alter table t with system versioning;
|
||||
ERROR 42S21: Duplicate column name 'sys_trx_end'
|
||||
create or replace temporary table t (x int) with system versioning;
|
||||
ERROR HY000: Incorrect usage of TEMPORARY and WITH SYSTEM VERSIONING
|
||||
create or replace table t1 (
|
||||
x11 int unsigned,
|
||||
Sys_start0 timestamp(6) generated always as row start,
|
||||
Sys_start timestamp(6) generated always as row start,
|
||||
Sys_end timestamp(6) generated always as row end,
|
||||
period for system_time (Sys_start, Sys_end)
|
||||
) with system versioning;
|
||||
ERROR HY000: Duplicate ROW START column `Sys_start`
|
||||
drop database test;
|
||||
create database test;
|
||||
|
Reference in New Issue
Block a user