diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2019-02-04 09:37:39 +1000 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-02-21 14:57:09 +0100 |
commit | 6294516a56b3ae3d4b72326a61cfe9fe014b56c7 (patch) | |
tree | fe22a6a2cf2a46135c1a2c7734b6911cd43e43e9 /mysql-test/suite/period/r/create.result | |
parent | b2bd52290a4faeb2646b25fc3950542e41f33050 (diff) | |
download | mariadb-git-6294516a56b3ae3d4b72326a61cfe9fe014b56c7.tar.gz |
MDEV-16975 Application-time periods: ALTER TABLE
* implicit period constraint is hidden and cannot be dropped independently
* create...like and create...select support
Diffstat (limited to 'mysql-test/suite/period/r/create.result')
-rw-r--r-- | mysql-test/suite/period/r/create.result | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mysql-test/suite/period/r/create.result b/mysql-test/suite/period/r/create.result index e498e745240..df77669f727 100644 --- a/mysql-test/suite/period/r/create.result +++ b/mysql-test/suite/period/r/create.result @@ -1,5 +1,7 @@ create or replace table t (id int primary key, s date, e date, period for mytime(s,e)); +# CONSTRAINT CHECK (s < e) is added implicitly, and shouldn't be shown +# this is important for correct command-based replication show create table t; Table Create Table t CREATE TABLE `t` ( @@ -7,8 +9,7 @@ t CREATE TABLE `t` ( `s` date NOT NULL, `e` date NOT NULL, PRIMARY KEY (`id`), - PERIOD FOR `mytime` (`s`, `e`), - CONSTRAINT `CONSTRAINT_1` CHECK (`s` < `e`) + PERIOD FOR `mytime` (`s`, `e`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 create or replace table t (id int primary key, s timestamp(6), e timestamp(6), period for mytime(s,e)); @@ -19,8 +20,7 @@ t CREATE TABLE `t` ( `s` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000', `e` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000', PRIMARY KEY (`id`), - PERIOD FOR `mytime` (`s`, `e`), - CONSTRAINT `CONSTRAINT_1` CHECK (`s` < `e`) + PERIOD FOR `mytime` (`s`, `e`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 # SQL16, Part 2, 11.3 <table definition>, Syntax Rules, 2)a) # 2) If a <table period definition> TPD is specified, then: @@ -86,7 +86,8 @@ t CREATE TABLE `t` ( `s` date NOT NULL, `e` date NOT NULL, PERIOD FOR `mytime` (`s`, `e`), - CONSTRAINT `CONSTRAINT_1` CHECK (`s` < `e`), CONSTRAINT `mytime` CHECK (`x` > 1) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert t values (2, '2001-01-01', '2001-01-01'); +ERROR 23000: CONSTRAINT `mytime_1` failed for `test`.`t` create or replace database test; |