Commit f1490133 authored by Sergei Golubchik's avatar Sergei Golubchik

rename versioning_* variables

parent ca6454bc
......@@ -4897,6 +4897,76 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SYSTEM_VERSIONING_ALTER_HISTORY
SESSION_VALUE ERROR
GLOBAL_VALUE ERROR
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ERROR
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Versioning ALTER TABLE mode. ERROR: Fail ALTER with error; KEEP: Keep historical system rows and subject them to ALTER;
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST ERROR,KEEP
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SYSTEM_VERSIONING_ASOF
SESSION_VALUE DEFAULT
GLOBAL_VALUE DEFAULT
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE DEFAULT
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Default value for the FOR SYSTEM_TIME AS OF clause
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST DEFAULT
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SYSTEM_VERSIONING_FORCE
SESSION_VALUE OFF
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Force system versioning for all created tables
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME SYSTEM_VERSIONING_HIDE
SESSION_VALUE AUTO
GLOBAL_VALUE AUTO
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE AUTO
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Hide system versioning from being displayed in table info. AUTO: hide implicit system fields only in non-versioned and AS OF queries; IMPLICIT: hide implicit system fields in all queries; FULL: hide any system fields in all queries and hide versioning info in SHOW commands; NEVER: don't hide system fields
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST AUTO,IMPLICIT,FULL,NEVER
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SYSTEM_VERSIONING_INNODB_ALGORITHM_SIMPLE
SESSION_VALUE ON
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Use simple algorithm of timestamp handling in InnoDB instead of TRX_SEES
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME TABLE_DEFINITION_CACHE
SESSION_VALUE NULL
GLOBAL_VALUE 400
......@@ -5373,76 +5443,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NEVER,COMPLEMENTARY,PREFERABLY
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME VERSIONING_ALTER_HISTORY
SESSION_VALUE ERROR
GLOBAL_VALUE ERROR
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ERROR
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Versioning ALTER TABLE mode. ERROR: Fail ALTER with error; KEEP: Keep historical system rows and subject them to ALTER;
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST ERROR,KEEP
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME VERSIONING_ASOF_TIMESTAMP
SESSION_VALUE CURRENT
GLOBAL_VALUE CURRENT
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE CURRENT
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Default AS OF value for versioned queries
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST CURRENT,ALL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME VERSIONING_FORCE
SESSION_VALUE OFF
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Force system versioning for all created tables
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME VERSIONING_HIDE
SESSION_VALUE AUTO
GLOBAL_VALUE AUTO
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE AUTO
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Hide system versioning from being displayed in table info. AUTO: hide implicit system fields only in non-versioned and AS OF queries; IMPLICIT: hide implicit system fields in all queries; FULL: hide any system fields in all queries and hide versioning info in SHOW commands; NEVER: don't hide system fields
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST AUTO,IMPLICIT,FULL,NEVER
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME VERSIONING_INNODB_ALGORITHM_SIMPLE
SESSION_VALUE ON
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Use simple algorithm of timestamp handling in InnoDB instead of TRX_SEES
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WAIT_TIMEOUT
SESSION_VALUE 28800
GLOBAL_VALUE 28800
......
--versioning-hide=implicit
--system-versioning-hide=implicit
--plugin-load=versioning
select @@versioning_alter_history;
@@versioning_alter_history
select @@system_versioning_alter_history;
@@system_versioning_alter_history
ERROR
create table t(
a int
......@@ -21,7 +21,7 @@ t CREATE TABLE `t` (
PERIOD FOR SYSTEM_TIME (`sys_trx_start`, `sys_trx_end`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
alter table t add column y int;
ERROR HY000: Not allowed for versioned `test`.`t`. Change `versioning_alter_history` to proceed with ALTER.
ERROR HY000: Not allowed for versioned `test`.`t`. Change @@system_versioning_alter_history to proceed with ALTER.
alter table t engine innodb;
ERROR HY000: Not allowed for versioned `test`.`t`. Change to/from native versioning engine is prohibited.
alter table t drop system versioning;
......@@ -30,7 +30,7 @@ Table Create Table
t CREATE TABLE `t` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
set versioning_alter_history= keep;
set system_versioning_alter_history= keep;
alter table t
add column trx_start bigint(20) unsigned generated always as row start,
add column trx_end bigint(20) unsigned generated always as row end,
......@@ -503,9 +503,9 @@ Table Create Table
t CREATE TABLE `t` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
set versioning_alter_history= SURVIVE;
ERROR 42000: Variable 'versioning_alter_history' can't be set to the value of 'SURVIVE'
set versioning_alter_history= DROP;
ERROR 42000: Variable 'versioning_alter_history' can't be set to the value of 'DROP'
set system_versioning_alter_history= SURVIVE;
ERROR 42000: Variable 'system_versioning_alter_history' can't be set to the value of 'SURVIVE'
set system_versioning_alter_history= DROP;
ERROR 42000: Variable 'system_versioning_alter_history' can't be set to the value of 'DROP'
drop database test;
create database test;
......@@ -48,23 +48,23 @@ dept for system_time from timestamp @ts_1 to timestamp @ts_2 d
where d.dept_id = 10
and d.dept_id = e.dept_id;
emp_id dept_id name salary sys_trx_start sys_trx_end dept_id name sys_trx_start sys_trx_end
set statement versioning_asof_timestamp=@ts_0 for
set statement system_versioning_asof=@ts_0 for
select * from emp e, dept d
where d.dept_id = 10
and d.dept_id = e.dept_id;
emp_id dept_id name salary dept_id name
set statement versioning_asof_timestamp=@ts_1 for
set statement system_versioning_asof=@ts_1 for
select * from emp e, dept d
where d.dept_id = 10
and d.dept_id = e.dept_id;
emp_id dept_id name salary dept_id name
set statement versioning_asof_timestamp=@ts_2 for
set statement system_versioning_asof=@ts_2 for
select * from emp e, dept d
where d.dept_id = 10
and d.dept_id = e.dept_id;
emp_id dept_id name salary dept_id name
1 10 bill 1000 10 accounting
set statement versioning_asof_timestamp=@ts_3 for
set statement system_versioning_asof=@ts_3 for
select * from emp e, dept d
where d.dept_id = 10
and d.dept_id = e.dept_id;
......
create table t (a int) with system versioning;
insert into t values (1);
update t set a= 2;
show global variables like 'versioning_asof_timestamp';
show global variables like 'system_versioning_asof';
Variable_name Value
versioning_asof_timestamp CURRENT
show variables like 'versioning_asof_timestamp';
system_versioning_asof DEFAULT
show variables like 'system_versioning_asof';
Variable_name Value
versioning_asof_timestamp CURRENT
system_versioning_asof DEFAULT
select * from t;
a
2
set versioning_asof_timestamp= '2031-1-1 0:0:0';
show variables like 'versioning_asof_timestamp';
set system_versioning_asof= '2031-1-1 0:0:0';
show variables like 'system_versioning_asof';
Variable_name Value
versioning_asof_timestamp 2031-01-01 00:00:00.000000
system_versioning_asof 2031-01-01 00:00:00.000000
select * from t;
a
2
set versioning_asof_timestamp= '2011-1-1 0:0:0';
show variables like 'versioning_asof_timestamp';
set system_versioning_asof= '2011-1-1 0:0:0';
show variables like 'system_versioning_asof';
Variable_name Value
versioning_asof_timestamp 2011-01-01 00:00:00.000000
system_versioning_asof 2011-01-01 00:00:00.000000
select * from t;
a
set versioning_asof_timestamp= ALL;
show variables like 'versioning_asof_timestamp';
Variable_name Value
versioning_asof_timestamp ALL
select * from t;
a
2
1
create view vt as select * from t;
select * from t;
a
2
1
drop view vt;
select * from (select * from t) as tt;
a
2
1
set global versioning_asof_timestamp= 'alley';
ERROR 42000: Variable 'versioning_asof_timestamp' can't be set to the value of 'alley'
set global versioning_asof_timestamp= null;
ERROR 42000: Variable 'versioning_asof_timestamp' can't be set to the value of 'NULL'
set global versioning_asof_timestamp= 1;
ERROR 42000: Incorrect argument type to variable 'versioning_asof_timestamp'
set global versioning_asof_timestamp= 1.1;
ERROR 42000: Incorrect argument type to variable 'versioning_asof_timestamp'
set versioning_asof_timestamp= 'alley';
ERROR 42000: Variable 'versioning_asof_timestamp' can't be set to the value of 'alley'
set versioning_asof_timestamp= null;
ERROR 42000: Variable 'versioning_asof_timestamp' can't be set to the value of 'NULL'
set versioning_asof_timestamp= 1;
ERROR 42000: Incorrect argument type to variable 'versioning_asof_timestamp'
set versioning_asof_timestamp= 1.1;
ERROR 42000: Incorrect argument type to variable 'versioning_asof_timestamp'
set global versioning_asof_timestamp= '1911-11-11 11:11:11.1111119';
set global system_versioning_asof= 'alley';
ERROR 42000: Variable 'system_versioning_asof' can't be set to the value of 'alley'
set global system_versioning_asof= null;
ERROR 42000: Variable 'system_versioning_asof' can't be set to the value of 'NULL'
set global system_versioning_asof= 1;
ERROR 42000: Incorrect argument type to variable 'system_versioning_asof'
set global system_versioning_asof= 1.1;
ERROR 42000: Incorrect argument type to variable 'system_versioning_asof'
set system_versioning_asof= 'alley';
ERROR 42000: Variable 'system_versioning_asof' can't be set to the value of 'alley'
set system_versioning_asof= null;
ERROR 42000: Variable 'system_versioning_asof' can't be set to the value of 'NULL'
set system_versioning_asof= 1;
ERROR 42000: Incorrect argument type to variable 'system_versioning_asof'
set system_versioning_asof= 1.1;
ERROR 42000: Incorrect argument type to variable 'system_versioning_asof'
set global system_versioning_asof= '1911-11-11 11:11:11.1111119';
Warnings:
Note 1292 Truncated incorrect datetime value: '1911-11-11 11:11:11.1111119'
Note 1292 Truncated incorrect datetime value: '1911-11-11 11:11:11.1111119'
show global variables like 'versioning_asof_timestamp';
show global variables like 'system_versioning_asof';
Variable_name Value
versioning_asof_timestamp 1911-11-11 11:11:11.111111
set global versioning_asof_timestamp= '1900-01-01 00:00:00';
show global variables like 'versioning_asof_timestamp';
system_versioning_asof 1911-11-11 11:11:11.111111
set global system_versioning_asof= '1900-01-01 00:00:00';
show global variables like 'system_versioning_asof';
Variable_name Value
versioning_asof_timestamp 1900-01-01 00:00:00.000000
set global versioning_asof_timestamp= timestamp'1911-11-11 11:11:11.1111119';
system_versioning_asof 1900-01-01 00:00:00.000000
set global system_versioning_asof= timestamp'1911-11-11 11:11:11.1111119';
Warnings:
Note 1292 Truncated incorrect datetime value: '1911-11-11 11:11:11.1111119'
show global variables like 'versioning_asof_timestamp';
show global variables like 'system_versioning_asof';
Variable_name Value
versioning_asof_timestamp 1911-11-11 11:11:11.111111
system_versioning_asof 1911-11-11 11:11:11.111111
set @ts= timestamp'1900-01-01 00:00:00';
set global versioning_asof_timestamp= @ts;
show global variables like 'versioning_asof_timestamp';
set global system_versioning_asof= @ts;
show global variables like 'system_versioning_asof';
Variable_name Value
versioning_asof_timestamp 1900-01-01 00:00:00.000000
set versioning_asof_timestamp= '1911-11-11 11:11:11.1111119';
system_versioning_asof 1900-01-01 00:00:00.000000
set system_versioning_asof= '1911-11-11 11:11:11.1111119';
Warnings:
Note 1292 Truncated incorrect datetime value: '1911-11-11 11:11:11.1111119'
Note 1292 Truncated incorrect datetime value: '1911-11-11 11:11:11.1111119'
show variables like 'versioning_asof_timestamp';
show variables like 'system_versioning_asof';
Variable_name Value
versioning_asof_timestamp 1911-11-11 11:11:11.111111
set versioning_asof_timestamp= '1900-01-01 00:00:00';
show variables like 'versioning_asof_timestamp';
system_versioning_asof 1911-11-11 11:11:11.111111
set system_versioning_asof= '1900-01-01 00:00:00';
show variables like 'system_versioning_asof';
Variable_name Value
versioning_asof_timestamp 1900-01-01 00:00:00.000000
set versioning_asof_timestamp= timestamp'1911-11-11 11:11:11.1111119';
system_versioning_asof 1900-01-01 00:00:00.000000
set system_versioning_asof= timestamp'1911-11-11 11:11:11.1111119';
Warnings:
Note 1292 Truncated incorrect datetime value: '1911-11-11 11:11:11.1111119'
show variables like 'versioning_asof_timestamp';
show variables like 'system_versioning_asof';
Variable_name Value
versioning_asof_timestamp 1911-11-11 11:11:11.111111
system_versioning_asof 1911-11-11 11:11:11.111111
set @ts= timestamp'1900-01-01 00:00:00';
set versioning_asof_timestamp= @ts;
show variables like 'versioning_asof_timestamp';
set system_versioning_asof= @ts;
show variables like 'system_versioning_asof';
Variable_name Value
versioning_asof_timestamp 1900-01-01 00:00:00.000000
set global versioning_asof_timestamp= CURRENT;
set versioning_asof_timestamp= CURRENT;
show variables where variable_name = "versioning_hide";
system_versioning_asof 1900-01-01 00:00:00.000000
set global system_versioning_asof= DEFAULT;
set system_versioning_asof= DEFAULT;
show variables where variable_name = "system_versioning_hide";
Variable_name Value
versioning_hide IMPLICIT
system_versioning_hide IMPLICIT
select * from t for system_time all;
a
2
1
set versioning_hide= AUTO;
set system_versioning_hide= AUTO;
select * from t;
a
2
......@@ -129,11 +111,11 @@ select * from t for system_time between '0-0-0' and current_timestamp(6);
a sys_trx_start sys_trx_end
2 TIMESTAMP TIMESTAMP
1 TIMESTAMP TIMESTAMP
set versioning_hide= NEVER;
set system_versioning_hide= NEVER;
select * from t;
a sys_trx_start sys_trx_end
2 TIMESTAMP TIMESTAMP
set versioning_hide= FULL;
set system_versioning_hide= FULL;
create or replace table t (
x int,
st timestamp(6) generated always as row start,
......@@ -153,4 +135,4 @@ select * from t for system_time all;
x
2
drop table t;
set versioning_hide= IMPLICIT;
set system_versioning_hide= IMPLICIT;
select @@versioning_alter_history;
select @@system_versioning_alter_history;
create table t(
a int
......@@ -18,7 +18,7 @@ alter table t engine innodb;
alter table t drop system versioning;
show create table t;
set versioning_alter_history= keep;
set system_versioning_alter_history= keep;
--error ER_VERS_FIELD_WRONG_TYPE
alter table t
......@@ -287,10 +287,10 @@ show create table t;
## These experimental options are now disabled
--error ER_WRONG_VALUE_FOR_VAR
set versioning_alter_history= SURVIVE;
set system_versioning_alter_history= SURVIVE;
--error ER_WRONG_VALUE_FOR_VAR
set versioning_alter_history= DROP;
set system_versioning_alter_history= DROP;
if (0)
{
......
--plugin-load=versioning
--versioning-hide=implicit
--system-versioning-hide=implicit
--versioning-hide=implicit
--system-versioning-hide=implicit
--partition
--versioning-hide=implicit
--system-versioning-hide=implicit
-- source include/have_partition.inc
-- source suite/versioning/common.inc
### check System Versioning and conventional partitioning
......
--versioning-hide=implicit
--system-versioning-hide=implicit
......@@ -50,22 +50,22 @@ select * from
where d.dept_id = 10
and d.dept_id = e.dept_id;
set statement versioning_asof_timestamp=@ts_0 for
set statement system_versioning_asof=@ts_0 for
select * from emp e, dept d
where d.dept_id = 10
and d.dept_id = e.dept_id;
set statement versioning_asof_timestamp=@ts_1 for
set statement system_versioning_asof=@ts_1 for
select * from emp e, dept d
where d.dept_id = 10
and d.dept_id = e.dept_id;
set statement versioning_asof_timestamp=@ts_2 for
set statement system_versioning_asof=@ts_2 for
select * from emp e, dept d
where d.dept_id = 10
and d.dept_id = e.dept_id;
set statement versioning_asof_timestamp=@ts_3 for
set statement system_versioning_asof=@ts_3 for
select * from emp e, dept d
where d.dept_id = 10
and d.dept_id = e.dept_id;
......
--versioning-hide=implicit
--system-versioning-hide=implicit
......@@ -2,83 +2,73 @@ create table t (a int) with system versioning;
insert into t values (1);
update t set a= 2;
show global variables like 'versioning_asof_timestamp';
show variables like 'versioning_asof_timestamp';
show global variables like 'system_versioning_asof';
show variables like 'system_versioning_asof';
select * from t;
set versioning_asof_timestamp= '2031-1-1 0:0:0';
show variables like 'versioning_asof_timestamp';
set system_versioning_asof= '2031-1-1 0:0:0';
show variables like 'system_versioning_asof';
select * from t;
set versioning_asof_timestamp= '2011-1-1 0:0:0';
show variables like 'versioning_asof_timestamp';
set system_versioning_asof= '2011-1-1 0:0:0';
show variables like 'system_versioning_asof';
select * from t;
set versioning_asof_timestamp= ALL;
show variables like 'versioning_asof_timestamp';
select * from t;
create view vt as select * from t;
select * from t;
drop view vt;
select * from (select * from t) as tt;
# global
--error ER_WRONG_VALUE_FOR_VAR
set global versioning_asof_timestamp= 'alley';
set global system_versioning_asof= 'alley';
--error ER_WRONG_VALUE_FOR_VAR
set global versioning_asof_timestamp= null;
set global system_versioning_asof= null;
--error ER_WRONG_TYPE_FOR_VAR
set global versioning_asof_timestamp= 1;
set global system_versioning_asof= 1;
--error ER_WRONG_TYPE_FOR_VAR
set global versioning_asof_timestamp= 1.1;
set global system_versioning_asof= 1.1;
# session
--error ER_WRONG_VALUE_FOR_VAR
set versioning_asof_timestamp= 'alley';
set system_versioning_asof= 'alley';
--error ER_WRONG_VALUE_FOR_VAR
set versioning_asof_timestamp= null;
set system_versioning_asof= null;
--error ER_WRONG_TYPE_FOR_VAR
set versioning_asof_timestamp= 1;
set system_versioning_asof= 1;
--error ER_WRONG_TYPE_FOR_VAR
set versioning_asof_timestamp= 1.1;
set system_versioning_asof= 1.1;
# global
set global versioning_asof_timestamp= '1911-11-11 11:11:11.1111119';
show global variables like 'versioning_asof_timestamp';
set global system_versioning_asof= '1911-11-11 11:11:11.1111119';
show global variables like 'system_versioning_asof';
set global versioning_asof_timestamp= '1900-01-01 00:00:00';
show global variables like 'versioning_asof_timestamp';
set global system_versioning_asof= '1900-01-01 00:00:00';
show global variables like 'system_versioning_asof';
set global versioning_asof_timestamp= timestamp'1911-11-11 11:11:11.1111119';
show global variables like 'versioning_asof_timestamp';
set global system_versioning_asof= timestamp'1911-11-11 11:11:11.1111119';
show global variables like 'system_versioning_asof';
set @ts= timestamp'1900-01-01 00:00:00';
set global versioning_asof_timestamp= @ts;
show global variables like 'versioning_asof_timestamp';
set global system_versioning_asof= @ts;
show global variables like 'system_versioning_asof';
# session
set versioning_asof_timestamp= '1911-11-11 11:11:11.1111119';
show variables like 'versioning_asof_timestamp';
set system_versioning_asof= '1911-11-11 11:11:11.1111119';
show variables like 'system_versioning_asof';
set versioning_asof_timestamp= '1900-01-01 00:00:00';
show variables like 'versioning_asof_timestamp';
set system_versioning_asof= '1900-01-01 00:00:00';
show variables like 'system_versioning_asof';
set versioning_asof_timestamp= timestamp'1911-11-11 11:11:11.1111119';
show variables like 'versioning_asof_timestamp';
set system_versioning_asof= timestamp'1911-11-11 11:11:11.1111119';
show variables like 'system_versioning_asof';
set @ts= timestamp'1900-01-01 00:00:00';
set versioning_asof_timestamp= @ts;
show variables like 'versioning_asof_timestamp';
set system_versioning_asof= @ts;
show variables like 'system_versioning_asof';
set global versioning_asof_timestamp= CURRENT;
set versioning_asof_timestamp= CURRENT;
set global system_versioning_asof= DEFAULT;
set system_versioning_asof= DEFAULT;
show variables where variable_name = "versioning_hide";
show variables where variable_name = "system_versioning_hide";
select * from t for system_time all;
set versioning_hide= AUTO;
set system_versioning_hide= AUTO;
select * from t;
select * from t for system_time as of timestamp current_timestamp(6);
--replace_regex /\d{4}-\d\d-\d\d \d\d:\d\d:\d\d\.\d{6}/TIMESTAMP/
......@@ -88,11 +78,11 @@ select * from t for system_time from '0-0-0' to current_timestamp(6);
--replace_regex /\d{4}-\d\d-\d\d \d\d:\d\d:\d\d\.\d{6}/TIMESTAMP/
select * from t for system_time between '0-0-0' and current_timestamp(6);
set versioning_hide= NEVER;
set system_versioning_hide= NEVER;
--replace_regex /\d{4}-\d\d-\d\d \d\d:\d\d:\d\d\.\d{6}/TIMESTAMP/
select * from t;
set versioning_hide= FULL;
set system_versioning_hide= FULL;
create or replace table t (
x int,
st timestamp(6) generated always as row start,
......@@ -108,4 +98,4 @@ select * from t;
select * from t for system_time all;
drop table t;
set versioning_hide= IMPLICIT;
set system_versioning_hide= IMPLICIT;
--versioning-hide=implicit
--system-versioning-hide=implicit
--versioning-hide=implicit
--system-versioning-hide=implicit
......@@ -23,7 +23,7 @@ set sql_mode='';
set @orig_storage_engine=@@storage_engine;
set storage_engine=myisam;
set versioning_alter_history=keep;
set system_versioning_alter_history=keep;
set @have_innodb= (select count(engine) from information_schema.engines where engine='INNODB' and support != 'NO');
SET @innodb_or_myisam=IF(@have_innodb <> 0, 'InnoDB', 'MyISAM');
......
......@@ -7852,7 +7852,7 @@ WARN_VERS_PART_NON_HISTORICAL
eng "Partition %`s contains non-historical data"
ER_VERS_ALTER_NOT_ALLOWED
eng "Not allowed for versioned %`s.%`s. Change `versioning_alter_history` to proceed with ALTER."
eng "Not allowed for versioned %`s.%`s. Change @@system_versioning_alter_history to proceed with ALTER."
ER_VERS_ALTER_ENGINE_PROHIBITED
eng "Not allowed for versioned %`s.%`s. Change to/from native versioning engine is prohibited."
......
......@@ -387,19 +387,19 @@ static Sys_var_charptr Sys_my_bind_addr(
READ_ONLY GLOBAL_VAR(my_bind_addr_str), CMD_LINE(REQUIRED_ARG),
IN_FS_CHARSET, DEFAULT(0));
const char *Sys_var_vers_asof::asof_keywords[]= {"CURRENT", "ALL", NULL};
const char *Sys_var_vers_asof::asof_keywords[]= {"DEFAULT", NULL};
static Sys_var_vers_asof Sys_vers_asof_timestamp(
"versioning_asof_timestamp", "Default AS OF value for versioned queries",
"system_versioning_asof", "Default value for the FOR SYSTEM_TIME AS OF clause",
SESSION_VAR(vers_asof_timestamp.type), NO_CMD_LINE,
Sys_var_vers_asof::asof_keywords, DEFAULT(FOR_SYSTEM_TIME_UNSPECIFIED));
static Sys_var_mybool Sys_vers_force(
"versioning_force", "Force system versioning for all created tables",
"system_versioning_force", "Force system versioning for all created tables",
SESSION_VAR(vers_force), CMD_LINE(OPT_ARG), DEFAULT(FALSE));
static const char *vers_hide_keywords[]= {"AUTO", "IMPLICIT", "FULL", "NEVER", NULL};
static Sys_var_enum Sys_vers_hide(
"versioning_hide", "Hide system versioning from being displayed in table info. "
"system_versioning_hide", "Hide system versioning from being displayed in table info. "
"AUTO: hide implicit system fields only in non-versioned and AS OF queries; "
"IMPLICIT: hide implicit system fields in all queries; "
"FULL: hide any system fields in all queries and hide versioning info in SHOW commands; "
......@@ -408,14 +408,14 @@ static Sys_var_enum Sys_vers_hide(
vers_hide_keywords, DEFAULT(VERS_HIDE_AUTO));
static Sys_var_mybool Sys_vers_innodb_algorithm_simple(
"versioning_innodb_algorithm_simple",
"system_versioning_innodb_algorithm_simple",
"Use simple algorithm of timestamp handling in InnoDB instead of TRX_SEES",
SESSION_VAR(vers_innodb_algorithm_simple), CMD_LINE(OPT_ARG),
DEFAULT(TRUE));
static const char *vers_alter_history_keywords[]= {"ERROR", "KEEP",/* "SURVIVE", "DROP",*/ NULL};
static Sys_var_enum Sys_vers_alter_history(
"versioning_alter_history", "Versioning ALTER TABLE mode. "
"system_versioning_alter_history", "Versioning ALTER TABLE mode. "
"ERROR: Fail ALTER with error; " /* TODO: fail only when history non-empty */
"KEEP: Keep historical system rows and subject them to ALTER; "
/*"SURVIVE: Keep historical system rows intact; "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment