diff options
Diffstat (limited to '')
-rw-r--r-- | mysql-test/suite/versioning/r/create.result | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/mysql-test/suite/versioning/r/create.result b/mysql-test/suite/versioning/r/create.result index c9d68f15..7ea8b39b 100644 --- a/mysql-test/suite/versioning/r/create.result +++ b/mysql-test/suite/versioning/r/create.result @@ -1,3 +1,5 @@ +select * from information_schema.periods; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PERIOD START_COLUMN_NAME END_COLUMN_NAME create table t1 ( x1 int unsigned, Sys_start SYS_DATATYPE as row start invisible comment 'start', @@ -12,6 +14,15 @@ t1 CREATE TABLE `t1` ( `Sys_end` SYS_DATATYPE GENERATED ALWAYS AS ROW END INVISIBLE COMMENT 'end', PERIOD FOR SYSTEM_TIME (`Sys_start`, `Sys_end`) ) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING +select * from information_schema.periods where table_name = 't1'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PERIOD START_COLUMN_NAME END_COLUMN_NAME +def test t1 SYSTEM_TIME Sys_start Sys_end +select column_name, is_system_time_period_start, is_system_time_period_end +from information_schema.columns where table_name = 't1'; +column_name is_system_time_period_start is_system_time_period_end +x1 NO NO +Sys_start YES NO +Sys_end NO YES select table_catalog,table_schema,table_name,table_type,version,table_rows,data_free,auto_increment,check_time,table_collation,checksum,create_options,table_comment from information_schema.tables where table_name='t1'; table_catalog def table_schema test @@ -81,6 +92,12 @@ Table Create Table t1 CREATE TABLE `t1` ( `x2` int(10) unsigned DEFAULT NULL ) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING +select * from information_schema.periods where table_name = 't1'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PERIOD START_COLUMN_NAME END_COLUMN_NAME +select column_name, is_system_time_period_start, is_system_time_period_end +from information_schema.columns where table_name = 't1'; +column_name is_system_time_period_start is_system_time_period_end +x2 NO NO create or replace table t1 ( x3 int unsigned, Sys_start timestamp(6) as row start invisible, @@ -271,12 +288,8 @@ t3 CREATE TABLE `t3` ( ## For versioned table insert into t1 values (1); select row_start from t1 into @row_start; -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead insert into t0 (y) values (2); select st from t0 into @st; -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead create or replace table t2 with system versioning as select * from t1; show create table t2; Table Create Table @@ -339,12 +352,8 @@ ERROR 42S21: Duplicate column name 'row_end' # Prepare checking for historical row delete from t1; select row_end from t1 for system_time all into @row_end; -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead delete from t0; select en from t0 for system_time all into @en; -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ## Combinations of versioned + non-versioned create or replace table t2 (y int); insert into t2 values (3); @@ -365,14 +374,10 @@ insert into t2 (y) values (1), (2); delete from t2 where y = 2; create or replace table t3 select * from t2 for system_time all; select st, en from t3 where y = 1 into @st, @en; -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead select y from t2 for system_time all where st = @st and en = @en; y 1 select st, en from t3 where y = 2 into @st, @en; -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead select y from t2 for system_time all where st = @st and en = @en; y 2 |