Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
44506f26
Commit
44506f26
authored
May 03, 2017
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL: vers_ sysvars renamed to versioning_
parent
dc12395b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
115 additions
and
115 deletions
+115
-115
mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
...l-test/suite/sys_vars/r/sysvars_server_notembedded.result
+4
-4
mysql-test/suite/versioning/common.opt
mysql-test/suite/versioning/common.opt
+1
-1
mysql-test/suite/versioning/r/sysvars.result
mysql-test/suite/versioning/r/sysvars.result
+61
-61
mysql-test/suite/versioning/t/foreign.opt
mysql-test/suite/versioning/t/foreign.opt
+1
-1
mysql-test/suite/versioning/t/partition.opt
mysql-test/suite/versioning/t/partition.opt
+1
-1
mysql-test/suite/versioning/t/rpl_test.opt
mysql-test/suite/versioning/t/rpl_test.opt
+1
-1
mysql-test/suite/versioning/t/sysvars.opt
mysql-test/suite/versioning/t/sysvars.opt
+1
-1
mysql-test/suite/versioning/t/sysvars.test
mysql-test/suite/versioning/t/sysvars.test
+39
-39
mysql-test/suite/versioning/t/truncate_history.opt
mysql-test/suite/versioning/t/truncate_history.opt
+1
-1
mysql-test/suite/versioning/t/view.opt
mysql-test/suite/versioning/t/view.opt
+1
-1
sql/sys_vars.cc
sql/sys_vars.cc
+4
-4
No files found.
mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
View file @
44506f26
...
...
@@ -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 VERS
IONING_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 VERS
IONING
_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 VERS
IONING
_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 VERS
IONING
_INNODB_ALGORITHM_SIMPLE
SESSION_VALUE ON
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
...
...
mysql-test/suite/versioning/common.opt
View file @
44506f26
...
...
@@ -15,4 +15,4 @@
--innodb-sys-tables
--innodb-sys-virtual
--innodb-vtq
--vers-hide=implicit
--vers
ioning
-hide=implicit
mysql-test/suite/versioning/r/sysvars.result
View file @
44506f26
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 'vers
ioning_current_timestamp
';
Variable_name Value
vers
_current_time
NOW
show variables like 'vers
_current_time
';
vers
ioning_current_timestamp
NOW
show variables like 'vers
ioning_current_timestamp
';
Variable_name Value
vers
_current_time
NOW
vers
ioning_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 vers
ioning_current_timestamp
= '2031-1-1 0:0:0';
show variables like 'vers
ioning_current_timestamp
';
Variable_name Value
vers
_current_time
2031-01-01 00:00:00.000000
vers
ioning_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 vers
ioning_current_timestamp
= '2011-1-1 0:0:0';
show variables like 'vers
ioning_current_timestamp
';
Variable_name Value
vers
_current_time
2011-01-01 00:00:00.000000
vers
ioning_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 vers
ioning_current_timestamp
= 'all';
show variables like 'vers
ioning_current_timestamp
';
Variable_name Value
vers
_current_time
ALL
vers
ioning_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 vers
ioning_current_timestamp
= 'alley';
ERROR 42000: Variable 'vers
ioning_current_timestamp
' can't be set to the value of 'alley'
set global vers
ioning_current_timestamp
= null;
ERROR 42000: Variable 'vers
ioning_current_timestamp
' can't be set to the value of 'NULL'
set global vers
ioning_current_timestamp
= 1;
ERROR 42000: Incorrect argument type to variable 'vers
ioning_current_timestamp
'
set global vers
ioning_current_timestamp
= 1.1;
ERROR 42000: Incorrect argument type to variable 'vers
ioning_current_timestamp
'
set vers
ioning_current_timestamp
= 'alley';
ERROR 42000: Variable 'vers
ioning_current_timestamp
' can't be set to the value of 'alley'
set vers
ioning_current_timestamp
= null;
ERROR 42000: Variable 'vers
ioning_current_timestamp
' can't be set to the value of 'NULL'
set vers
ioning_current_timestamp
= 1;
ERROR 42000: Incorrect argument type to variable 'vers
ioning_current_timestamp
'
set vers
ioning_current_timestamp
= 1.1;
ERROR 42000: Incorrect argument type to variable 'vers
ioning_current_timestamp
'
set global vers
ioning_current_timestamp
= '1911-11-11 11:11:11.1111119';
show global variables like 'vers
ioning_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
';
vers
ioning_current_timestamp
1911-11-11 11:11:11.111111
set global vers
ioning_current_timestamp
= '1900-01-01 00:00:00';
show global variables like 'vers
ioning_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';
vers
ioning_current_timestamp
1900-01-01 00:00:00.000000
set global vers
ioning_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 'vers
ioning_current_timestamp
';
Variable_name Value
vers
_current_time
1911-11-11 11:11:11.111111
vers
ioning_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 vers
ioning_current_timestamp
= @ts;
show global variables like 'vers
ioning_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
';
vers
ioning_current_timestamp
1900-01-01 00:00:00.000000
set vers
ioning_current_timestamp
= '1911-11-11 11:11:11.1111119';
show variables like 'vers
ioning_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
';
vers
ioning_current_timestamp
1911-11-11 11:11:11.111111
set vers
ioning_current_timestamp
= '1900-01-01 00:00:00';
show variables like 'vers
ioning_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';
vers
ioning_current_timestamp
1900-01-01 00:00:00.000000
set vers
ioning_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 'vers
ioning_current_timestamp
';
Variable_name Value
vers
_current_time
1911-11-11 11:11:11.111111
vers
ioning_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 vers
ioning_current_timestamp
= @ts;
show variables like 'vers
ioning_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";
vers
ioning_current_timestamp
1900-01-01 00:00:00.000000
set global vers
ioning_current_timestamp
= 'now';
set vers
ioning_current_timestamp
= 'now';
show variables where variable_name = "vers
ioning
_hide";
Variable_name Value
vers_hide IMPLICIT
vers
ioning
_hide IMPLICIT
select * from t for system_time all;
a
2
1
set vers_hide= AUTO;
set vers
ioning
_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 vers
ioning
_hide= NEVER;
select * from t;
a sys_trx_start sys_trx_end
2 TIMESTAMP TIMESTAMP
set vers_hide= FULL;
set vers
ioning
_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 vers
ioning
_hide= IMPLICIT;
mysql-test/suite/versioning/t/foreign.opt
View file @
44506f26
--vers-hide=implicit
--vers
ioning
-hide=implicit
mysql-test/suite/versioning/t/partition.opt
View file @
44506f26
--vers-hide=implicit
--vers
ioning
-hide=implicit
mysql-test/suite/versioning/t/rpl_test.opt
View file @
44506f26
--vers-hide=implicit
--vers
ioning
-hide=implicit
mysql-test/suite/versioning/t/sysvars.opt
View file @
44506f26
--vers-hide=implicit
--vers
ioning
-hide=implicit
mysql-test/suite/versioning/t/sysvars.test
View file @
44506f26
...
...
@@ -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
'vers
ioning_current_timestamp
'
;
show
variables
like
'vers
ioning_current_timestamp
'
;
select
*
from
t
;
set
vers
_current_time
=
'2031-1-1 0:0:0'
;
show
variables
like
'vers
_current_time
'
;
set
vers
ioning_current_timestamp
=
'2031-1-1 0:0:0'
;
show
variables
like
'vers
ioning_current_timestamp
'
;
select
*
from
t
;
set
vers
_current_time
=
'2011-1-1 0:0:0'
;
show
variables
like
'vers
_current_time
'
;
set
vers
ioning_current_timestamp
=
'2011-1-1 0:0:0'
;
show
variables
like
'vers
ioning_current_timestamp
'
;
select
*
from
t
;
set
vers
_current_time
=
'all'
;
show
variables
like
'vers
_current_time
'
;
set
vers
ioning_current_timestamp
=
'all'
;
show
variables
like
'vers
ioning_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
vers
ioning_current_timestamp
=
'alley'
;
--
error
ER_WRONG_VALUE_FOR_VAR
set
global
vers
_current_time
=
null
;
set
global
vers
ioning_current_timestamp
=
null
;
--
error
ER_WRONG_TYPE_FOR_VAR
set
global
vers
_current_time
=
1
;
set
global
vers
ioning_current_timestamp
=
1
;
--
error
ER_WRONG_TYPE_FOR_VAR
set
global
vers
_current_time
=
1.1
;
set
global
vers
ioning_current_timestamp
=
1.1
;
# session
--
error
ER_WRONG_VALUE_FOR_VAR
set
vers
_current_time
=
'alley'
;
set
vers
ioning_current_timestamp
=
'alley'
;
--
error
ER_WRONG_VALUE_FOR_VAR
set
vers
_current_time
=
null
;
set
vers
ioning_current_timestamp
=
null
;
--
error
ER_WRONG_TYPE_FOR_VAR
set
vers
_current_time
=
1
;
set
vers
ioning_current_timestamp
=
1
;
--
error
ER_WRONG_TYPE_FOR_VAR
set
vers
_current_time
=
1.1
;
set
vers
ioning_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
vers
ioning_current_timestamp
=
'1911-11-11 11:11:11.1111119'
;
show
global
variables
like
'vers
ioning_current_timestamp
'
;
set
global
vers
_current_time
=
'1900-01-01 00:00:00'
;
show
global
variables
like
'vers
_current_time
'
;
set
global
vers
ioning_current_timestamp
=
'1900-01-01 00:00:00'
;
show
global
variables
like
'vers
ioning_current_timestamp
'
;
set
global
vers
_current_time
=
timestamp
'1911-11-11 11:11:11.1111119'
;
show
global
variables
like
'vers
_current_time
'
;
set
global
vers
ioning_current_timestamp
=
timestamp
'1911-11-11 11:11:11.1111119'
;
show
global
variables
like
'vers
ioning_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
vers
ioning_current_timestamp
=
@
ts
;
show
global
variables
like
'vers
ioning_current_timestamp
'
;
# session
set
vers
_current_time
=
'1911-11-11 11:11:11.1111119'
;
show
variables
like
'vers
_current_time
'
;
set
vers
ioning_current_timestamp
=
'1911-11-11 11:11:11.1111119'
;
show
variables
like
'vers
ioning_current_timestamp
'
;
set
vers
_current_time
=
'1900-01-01 00:00:00'
;
show
variables
like
'vers
_current_time
'
;
set
vers
ioning_current_timestamp
=
'1900-01-01 00:00:00'
;
show
variables
like
'vers
ioning_current_timestamp
'
;
set
vers
_current_time
=
timestamp
'1911-11-11 11:11:11.1111119'
;
show
variables
like
'vers
_current_time
'
;
set
vers
ioning_current_timestamp
=
timestamp
'1911-11-11 11:11:11.1111119'
;
show
variables
like
'vers
ioning_current_timestamp
'
;
set
@
ts
=
timestamp
'1900-01-01 00:00:00'
;
set
vers
_current_time
=
@
ts
;
show
variables
like
'vers
_current_time
'
;
set
vers
ioning_current_timestamp
=
@
ts
;
show
variables
like
'vers
ioning_current_timestamp
'
;
set
global
vers
_current_time
=
'now'
;
set
vers
_current_time
=
'now'
;
set
global
vers
ioning_current_timestamp
=
'now'
;
set
vers
ioning_current_timestamp
=
'now'
;
show
variables
where
variable_name
=
"vers_hide"
;
show
variables
where
variable_name
=
"vers
ioning
_hide"
;
select
*
from
t
for
system_time
all
;
set
vers_hide
=
AUTO
;
set
vers
ioning
_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
vers
ioning
_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
vers
ioning
_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
vers
ioning
_hide
=
IMPLICIT
;
mysql-test/suite/versioning/t/truncate_history.opt
View file @
44506f26
--vers-hide=implicit
--vers
ioning
-hide=implicit
mysql-test/suite/versioning/t/view.opt
View file @
44506f26
--vers-hide=implicit
--vers
ioning
-hide=implicit
sql/sys_vars.cc
View file @
44506f26
...
...
@@ -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"
,
"vers
ioning_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"
,
"vers
ioning
_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. "
"vers
ioning
_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"
,
"vers
ioning
_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
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment