diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-01-18 06:28:37 +0300 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-02-23 15:33:22 +0100 |
commit | 9fa715b84d68d5089bae3bfcfda060da816339e0 (patch) | |
tree | 17e4f06bb8bc68715e56d7437a56f4123762377b /mysql-test/suite/versioning/t/alter.test | |
parent | 9f6a7ed2d78af260838658369e7b3308f21d55ec (diff) | |
download | mariadb-git-9fa715b84d68d5089bae3bfcfda060da816339e0.tar.gz |
MDEV-14798 Add, drop system versioning semantic and syntax
SQL: DROP PERIOD FOR SYSTEM_TIME syntax
and remove ER_VERS_SYS_FIELD_EXISTS
originally by: Eugene Kosov
Diffstat (limited to 'mysql-test/suite/versioning/t/alter.test')
-rw-r--r-- | mysql-test/suite/versioning/t/alter.test | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/mysql-test/suite/versioning/t/alter.test b/mysql-test/suite/versioning/t/alter.test index d0fef1e8fcd..128397b6cc8 100644 --- a/mysql-test/suite/versioning/t/alter.test +++ b/mysql-test/suite/versioning/t/alter.test @@ -53,7 +53,7 @@ alter table t add system versioning; show create table t; ---error ER_VERS_SYS_FIELD_EXISTS +--error ER_MISSING alter table t drop system versioning; alter table t drop column trx_start, drop column trx_end; @@ -405,7 +405,36 @@ set statement system_versioning_alter_history=keep for alter table t1 add column row_start timestamp(6); --echo # MDEV-14798 Add, drop system versioning semantic and syntax -create or replace table t (a int) with system versioning; +create or replace table t ( + a int, + row_start timestamp(6) generated always as row start, + row_end timestamp(6) generated always as row end, + period for system_time(row_start, row_end) +) with system versioning; +show create table t; + +alter table t + drop column row_start, + drop column row_end, + drop period for system_time, + drop system versioning; +show create table t; + +--error ER_VERS_NOT_VERSIONED +alter table t drop period for system_time; + +create or replace table t ( + a int, + row_start timestamp(6) generated always as row start, + row_end timestamp(6) generated always as row end, + period for system_time(row_start, row_end) +) with system versioning; +--error ER_MISSING +alter table t drop period for system_time; +--error ER_MISSING +alter table t drop column sys_trx_start, drop period for system_time; +--error ER_MISSING +alter table t drop column sys_trx_end, drop period for system_time; --error ER_VERS_ALREADY_VERSIONED alter table t add period for system_time(sys_trx_start, sys_trx_end); |