Skip to content

Commit

Permalink
SQL: vers_ sysvars renamed to versioning_
Browse files Browse the repository at this point in the history
  • Loading branch information
midenok committed May 5, 2017
1 parent dc12395 commit 44506f2
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 115 deletions.
8 changes: 4 additions & 4 deletions mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/versioning/common.opt
Expand Up @@ -15,4 +15,4 @@
--innodb-sys-tables
--innodb-sys-virtual
--innodb-vtq
--vers-hide=implicit
--versioning-hide=implicit
122 changes: 61 additions & 61 deletions mysql-test/suite/versioning/r/sysvars.result
@@ -1,32 +1,32 @@
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
Expand All @@ -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
Expand All @@ -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,
Expand All @@ -147,4 +147,4 @@ select * from t for system_time all;
x
1
drop table t;
set vers_hide= IMPLICIT;
set versioning_hide= IMPLICIT;
2 changes: 1 addition & 1 deletion mysql-test/suite/versioning/t/foreign.opt
@@ -1 +1 @@
--vers-hide=implicit
--versioning-hide=implicit
2 changes: 1 addition & 1 deletion mysql-test/suite/versioning/t/partition.opt
@@ -1 +1 @@
--vers-hide=implicit
--versioning-hide=implicit
2 changes: 1 addition & 1 deletion mysql-test/suite/versioning/t/rpl_test.opt
@@ -1 +1 @@
--vers-hide=implicit
--versioning-hide=implicit
2 changes: 1 addition & 1 deletion mysql-test/suite/versioning/t/sysvars.opt
@@ -1 +1 @@
--vers-hide=implicit
--versioning-hide=implicit
78 changes: 39 additions & 39 deletions mysql-test/suite/versioning/t/sysvars.test
Expand Up @@ -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;
Expand All @@ -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/
Expand All @@ -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,
Expand All @@ -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;
2 changes: 1 addition & 1 deletion mysql-test/suite/versioning/t/truncate_history.opt
@@ -1 +1 @@
--vers-hide=implicit
--versioning-hide=implicit
2 changes: 1 addition & 1 deletion mysql-test/suite/versioning/t/view.opt
@@ -1 +1 @@
--vers-hide=implicit
--versioning-hide=implicit

0 comments on commit 44506f2

Please sign in to comment.