mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-22597 Add views for periods in information_schema
Two new information_schema views are added: * PERIOD table -- columns TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, PERIOD_NAME, START_COLUMN_NAME, END_COLUMN_NAME. * KEY_PERIOD_USAGE -- works similar to KEY_COLUMN_USAGE, but for periods. Columns CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME, TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, PERIOD_NAME Two new columns are added to the COLUMNS view: IS_SYSTEM_TIME_PERIOD_START, IS_SYSTEM_TIME_PERIOD_END - contain YES/NO.
This commit is contained in:
committed by
Oleksandr Byelkin
parent
85f9df29c0
commit
4246c0fa01
@@ -3,6 +3,8 @@
|
||||
|
||||
--enable_prepare_warnings
|
||||
|
||||
select * from information_schema.periods;
|
||||
|
||||
--replace_result $default_engine DEFAULT_ENGINE $sys_datatype_expl SYS_DATATYPE NULL ''
|
||||
eval create table t1 (
|
||||
x1 int unsigned,
|
||||
@@ -13,6 +15,10 @@ eval create table t1 (
|
||||
--replace_result $default_engine DEFAULT_ENGINE $sys_datatype_expl SYS_DATATYPE
|
||||
show create table t1;
|
||||
|
||||
select * from information_schema.periods where table_name = 't1';
|
||||
select column_name, is_system_time_period_start, is_system_time_period_end
|
||||
from information_schema.columns where table_name = 't1';
|
||||
|
||||
--query_vertical 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'
|
||||
--query_vertical select table_catalog,table_schema,table_name,column_name,ordinal_position,column_default,character_maximum_length,character_octet_length,character_set_name,collation_name,column_key,extra,column_comment,is_generated,generation_expression from information_schema.columns where table_name='t1'
|
||||
|
||||
@@ -23,6 +29,10 @@ create or replace table t1 (
|
||||
--replace_result $default_engine DEFAULT_ENGINE
|
||||
show create table t1;
|
||||
|
||||
select * from information_schema.periods where table_name = 't1';
|
||||
select column_name, is_system_time_period_start, is_system_time_period_end
|
||||
from information_schema.columns where table_name = 't1';
|
||||
|
||||
--replace_result $default_engine DEFAULT_ENGINE
|
||||
--error ER_VERS_PERIOD_COLUMNS
|
||||
eval create or replace table t1 (
|
||||
|
Reference in New Issue
Block a user