Commit 44506f26 authored by Aleksey Midenkov's avatar Aleksey Midenkov

SQL: vers_ sysvars renamed to versioning_

parent dc12395b
......@@ -5119,7 +5119,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NEVER,COMPLEMENTARY,PREFERABLY
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME VERS_CURRENT_TIME
VARIABLE_NAME VERSIONING_CURRENT_TIMESTAMP
SESSION_VALUE NOW
GLOBAL_VALUE NOW
GLOBAL_VALUE_ORIGIN COMPILE-TIME
......@@ -5133,7 +5133,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME VERS_FORCE
VARIABLE_NAME VERSIONING_FORCE
SESSION_VALUE OFF
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
......@@ -5147,7 +5147,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME VERS_HIDE
VARIABLE_NAME VERSIONING_HIDE
SESSION_VALUE AUTO
GLOBAL_VALUE AUTO
GLOBAL_VALUE_ORIGIN COMPILE-TIME
......@@ -5161,7 +5161,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST AUTO,IMPLICIT,FULL,NEVER
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME VERS_INNODB_ALGORITHM_SIMPLE
VARIABLE_NAME VERSIONING_INNODB_ALGORITHM_SIMPLE
SESSION_VALUE ON
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
......
......@@ -15,4 +15,4 @@
--innodb-sys-tables
--innodb-sys-virtual
--innodb-vtq
--vers-hide=implicit
--versioning-hide=implicit
create table t (a int) with system versioning;
insert into t values (1);
update t set a= 2;
show global variables like 'vers_current_time';
show global variables like 'versioning_current_timestamp';
Variable_name Value
vers_current_time NOW
show variables like 'vers_current_time';
versioning_current_timestamp NOW
show variables like 'versioning_current_timestamp';
Variable_name Value
vers_current_time NOW
versioning_current_timestamp NOW
select * from t;
a
2
set vers_current_time = '2031-1-1 0:0:0';
show variables like 'vers_current_time';
set versioning_current_timestamp = '2031-1-1 0:0:0';
show variables like 'versioning_current_timestamp';
Variable_name Value
vers_current_time 2031-01-01 00:00:00.000000
versioning_current_timestamp 2031-01-01 00:00:00.000000
select * from t;
a
2
set vers_current_time = '2011-1-1 0:0:0';
show variables like 'vers_current_time';
set versioning_current_timestamp = '2011-1-1 0:0:0';
show variables like 'versioning_current_timestamp';
Variable_name Value
vers_current_time 2011-01-01 00:00:00.000000
versioning_current_timestamp 2011-01-01 00:00:00.000000
select * from t;
a
set vers_current_time = 'all';
show variables like 'vers_current_time';
set versioning_current_timestamp = 'all';
show variables like 'versioning_current_timestamp';
Variable_name Value
vers_current_time ALL
versioning_current_timestamp ALL
select * from t;
a
2
......@@ -41,70 +41,70 @@ select * from (select * from t) as tt;
a
2
1
set global vers_current_time= 'alley';
ERROR 42000: Variable 'vers_current_time' can't be set to the value of 'alley'
set global vers_current_time= null;
ERROR 42000: Variable 'vers_current_time' can't be set to the value of 'NULL'
set global vers_current_time= 1;
ERROR 42000: Incorrect argument type to variable 'vers_current_time'
set global vers_current_time= 1.1;
ERROR 42000: Incorrect argument type to variable 'vers_current_time'
set vers_current_time= 'alley';
ERROR 42000: Variable 'vers_current_time' can't be set to the value of 'alley'
set vers_current_time= null;
ERROR 42000: Variable 'vers_current_time' can't be set to the value of 'NULL'
set vers_current_time= 1;
ERROR 42000: Incorrect argument type to variable 'vers_current_time'
set vers_current_time= 1.1;
ERROR 42000: Incorrect argument type to variable 'vers_current_time'
set global vers_current_time= '1911-11-11 11:11:11.1111119';
show global variables like 'vers_current_time';
set global versioning_current_timestamp= 'alley';
ERROR 42000: Variable 'versioning_current_timestamp' can't be set to the value of 'alley'
set global versioning_current_timestamp= null;
ERROR 42000: Variable 'versioning_current_timestamp' can't be set to the value of 'NULL'
set global versioning_current_timestamp= 1;
ERROR 42000: Incorrect argument type to variable 'versioning_current_timestamp'
set global versioning_current_timestamp= 1.1;
ERROR 42000: Incorrect argument type to variable 'versioning_current_timestamp'
set versioning_current_timestamp= 'alley';
ERROR 42000: Variable 'versioning_current_timestamp' can't be set to the value of 'alley'
set versioning_current_timestamp= null;
ERROR 42000: Variable 'versioning_current_timestamp' can't be set to the value of 'NULL'
set versioning_current_timestamp= 1;
ERROR 42000: Incorrect argument type to variable 'versioning_current_timestamp'
set versioning_current_timestamp= 1.1;
ERROR 42000: Incorrect argument type to variable 'versioning_current_timestamp'
set global versioning_current_timestamp= '1911-11-11 11:11:11.1111119';
show global variables like 'versioning_current_timestamp';
Variable_name Value
vers_current_time 1911-11-11 11:11:11.111111
set global vers_current_time= '1900-01-01 00:00:00';
show global variables like 'vers_current_time';
versioning_current_timestamp 1911-11-11 11:11:11.111111
set global versioning_current_timestamp= '1900-01-01 00:00:00';
show global variables like 'versioning_current_timestamp';
Variable_name Value
vers_current_time 1900-01-01 00:00:00.000000
set global vers_current_time= timestamp'1911-11-11 11:11:11.1111119';
versioning_current_timestamp 1900-01-01 00:00:00.000000
set global versioning_current_timestamp= 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 'vers_current_time';
show global variables like 'versioning_current_timestamp';
Variable_name Value
vers_current_time 1911-11-11 11:11:11.111111
versioning_current_timestamp 1911-11-11 11:11:11.111111
set @ts= timestamp'1900-01-01 00:00:00';
set global vers_current_time= @ts;
show global variables like 'vers_current_time';
set global versioning_current_timestamp= @ts;
show global variables like 'versioning_current_timestamp';
Variable_name Value
vers_current_time 1900-01-01 00:00:00.000000
set vers_current_time= '1911-11-11 11:11:11.1111119';
show variables like 'vers_current_time';
versioning_current_timestamp 1900-01-01 00:00:00.000000
set versioning_current_timestamp= '1911-11-11 11:11:11.1111119';
show variables like 'versioning_current_timestamp';
Variable_name Value
vers_current_time 1911-11-11 11:11:11.111111
set vers_current_time= '1900-01-01 00:00:00';
show variables like 'vers_current_time';
versioning_current_timestamp 1911-11-11 11:11:11.111111
set versioning_current_timestamp= '1900-01-01 00:00:00';
show variables like 'versioning_current_timestamp';
Variable_name Value
vers_current_time 1900-01-01 00:00:00.000000
set vers_current_time= timestamp'1911-11-11 11:11:11.1111119';
versioning_current_timestamp 1900-01-01 00:00:00.000000
set versioning_current_timestamp= 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 'vers_current_time';
show variables like 'versioning_current_timestamp';
Variable_name Value
vers_current_time 1911-11-11 11:11:11.111111
versioning_current_timestamp 1911-11-11 11:11:11.111111
set @ts= timestamp'1900-01-01 00:00:00';
set vers_current_time= @ts;
show variables like 'vers_current_time';
set versioning_current_timestamp= @ts;
show variables like 'versioning_current_timestamp';
Variable_name Value
vers_current_time 1900-01-01 00:00:00.000000
set global vers_current_time= 'now';
set vers_current_time= 'now';
show variables where variable_name = "vers_hide";
versioning_current_timestamp 1900-01-01 00:00:00.000000
set global versioning_current_timestamp= 'now';
set versioning_current_timestamp= 'now';
show variables where variable_name = "versioning_hide";
Variable_name Value
vers_hide IMPLICIT
versioning_hide IMPLICIT
select * from t for system_time all;
a
2
1
set vers_hide= AUTO;
set versioning_hide= AUTO;
select * from t;
a
2
......@@ -123,11 +123,11 @@ select * from t for system_time timestamp between '0-0-0' and current_timestamp(
a sys_trx_start sys_trx_end
2 TIMESTAMP TIMESTAMP
1 TIMESTAMP TIMESTAMP
set vers_hide= NEVER;
set versioning_hide= NEVER;
select * from t;
a sys_trx_start sys_trx_end
2 TIMESTAMP TIMESTAMP
set vers_hide= FULL;
set versioning_hide= FULL;
create or replace table t (
x int,
st timestamp(6) generated always as row start,
......@@ -147,4 +147,4 @@ select * from t for system_time all;
x
1
drop table t;
set vers_hide= IMPLICIT;
set versioning_hide= IMPLICIT;
--vers-hide=implicit
--versioning-hide=implicit
--vers-hide=implicit
--versioning-hide=implicit
--vers-hide=implicit
--versioning-hide=implicit
--vers-hide=implicit
--versioning-hide=implicit
......@@ -2,20 +2,20 @@ create table t (a int) with system versioning;
insert into t values (1);
update t set a= 2;
show global variables like 'vers_current_time';
show variables like 'vers_current_time';
show global variables like 'versioning_current_timestamp';
show variables like 'versioning_current_timestamp';
select * from t;
set vers_current_time = '2031-1-1 0:0:0';
show variables like 'vers_current_time';
set versioning_current_timestamp = '2031-1-1 0:0:0';
show variables like 'versioning_current_timestamp';
select * from t;
set vers_current_time = '2011-1-1 0:0:0';
show variables like 'vers_current_time';
set versioning_current_timestamp = '2011-1-1 0:0:0';
show variables like 'versioning_current_timestamp';
select * from t;
set vers_current_time = 'all';
show variables like 'vers_current_time';
set versioning_current_timestamp = 'all';
show variables like 'versioning_current_timestamp';
select * from t;
create view vt as select * from t;
......@@ -26,59 +26,59 @@ select * from (select * from t) as tt;
# global
--error ER_WRONG_VALUE_FOR_VAR
set global vers_current_time= 'alley';
set global versioning_current_timestamp= 'alley';
--error ER_WRONG_VALUE_FOR_VAR
set global vers_current_time= null;
set global versioning_current_timestamp= null;
--error ER_WRONG_TYPE_FOR_VAR
set global vers_current_time= 1;
set global versioning_current_timestamp= 1;
--error ER_WRONG_TYPE_FOR_VAR
set global vers_current_time= 1.1;
set global versioning_current_timestamp= 1.1;
# session
--error ER_WRONG_VALUE_FOR_VAR
set vers_current_time= 'alley';
set versioning_current_timestamp= 'alley';
--error ER_WRONG_VALUE_FOR_VAR
set vers_current_time= null;
set versioning_current_timestamp= null;
--error ER_WRONG_TYPE_FOR_VAR
set vers_current_time= 1;
set versioning_current_timestamp= 1;
--error ER_WRONG_TYPE_FOR_VAR
set vers_current_time= 1.1;
set versioning_current_timestamp= 1.1;
# global
set global vers_current_time= '1911-11-11 11:11:11.1111119';
show global variables like 'vers_current_time';
set global versioning_current_timestamp= '1911-11-11 11:11:11.1111119';
show global variables like 'versioning_current_timestamp';
set global vers_current_time= '1900-01-01 00:00:00';
show global variables like 'vers_current_time';
set global versioning_current_timestamp= '1900-01-01 00:00:00';
show global variables like 'versioning_current_timestamp';
set global vers_current_time= timestamp'1911-11-11 11:11:11.1111119';
show global variables like 'vers_current_time';
set global versioning_current_timestamp= timestamp'1911-11-11 11:11:11.1111119';
show global variables like 'versioning_current_timestamp';
set @ts= timestamp'1900-01-01 00:00:00';
set global vers_current_time= @ts;
show global variables like 'vers_current_time';
set global versioning_current_timestamp= @ts;
show global variables like 'versioning_current_timestamp';
# session
set vers_current_time= '1911-11-11 11:11:11.1111119';
show variables like 'vers_current_time';
set versioning_current_timestamp= '1911-11-11 11:11:11.1111119';
show variables like 'versioning_current_timestamp';
set vers_current_time= '1900-01-01 00:00:00';
show variables like 'vers_current_time';
set versioning_current_timestamp= '1900-01-01 00:00:00';
show variables like 'versioning_current_timestamp';
set vers_current_time= timestamp'1911-11-11 11:11:11.1111119';
show variables like 'vers_current_time';
set versioning_current_timestamp= timestamp'1911-11-11 11:11:11.1111119';
show variables like 'versioning_current_timestamp';
set @ts= timestamp'1900-01-01 00:00:00';
set vers_current_time= @ts;
show variables like 'vers_current_time';
set versioning_current_timestamp= @ts;
show variables like 'versioning_current_timestamp';
set global vers_current_time= 'now';
set vers_current_time= 'now';
set global versioning_current_timestamp= 'now';
set versioning_current_timestamp= 'now';
show variables where variable_name = "vers_hide";
show variables where variable_name = "versioning_hide";
select * from t for system_time all;
set vers_hide= AUTO;
set 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 +88,11 @@ select * from t for system_time timestamp 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 timestamp between '0-0-0' and current_timestamp(6);
set vers_hide= NEVER;
set versioning_hide= NEVER;
--replace_regex /\d{4}-\d\d-\d\d \d\d:\d\d:\d\d\.\d{6}/TIMESTAMP/
select * from t;
set vers_hide= FULL;
set versioning_hide= FULL;
create or replace table t (
x int,
st timestamp(6) generated always as row start,
......@@ -108,4 +108,4 @@ select * from t;
select * from t for system_time all;
drop table t;
set vers_hide= IMPLICIT;
set versioning_hide= IMPLICIT;
--vers-hide=implicit
--versioning-hide=implicit
......@@ -383,17 +383,17 @@ static Sys_var_charptr Sys_basedir(
IN_FS_CHARSET, DEFAULT(0));
static Sys_var_vers_asof Sys_vers_current_time(
"vers_current_time", "Default AS OF value for versioned tables",
"versioning_current_timestamp", "Default AS OF value for versioned tables",
SESSION_VAR(vers_current_time), CMD_LINE(REQUIRED_ARG, OPT_VERS_CURRENT_TIME),
IN_FS_CHARSET, DEFAULT("now"));
static Sys_var_mybool Sys_vers_force(
"vers_force", "Force system versioning for all created tables",
"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", NullS};
static Sys_var_enum Sys_vers_hide(
"vers_hide", "Hide system versioning from being displayed in table info. "
"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; "
......@@ -401,7 +401,7 @@ static Sys_var_enum Sys_vers_hide(
SESSION_VAR(vers_hide), CMD_LINE(OPT_ARG), vers_hide_keywords, DEFAULT(VERS_HIDE_AUTO));
static Sys_var_mybool Sys_vers_innodb_algorithm_simple(
"vers_innodb_algorithm_simple",
"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));
......
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