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
d6b68b0e
Commit
d6b68b0e
authored
Dec 21, 2017
by
Eugene Kosov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: mariabackup.system_versioning [#387]
parent
e6c5eb5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
6 deletions
+62
-6
mysql-test/suite/mariabackup/system_versioning.result
mysql-test/suite/mariabackup/system_versioning.result
+33
-4
mysql-test/suite/mariabackup/system_versioning.test
mysql-test/suite/mariabackup/system_versioning.test
+29
-2
No files found.
mysql-test/suite/mariabackup/system_versioning.result
View file @
d6b68b0e
...
...
@@ -9,10 +9,7 @@ insert into t values (3);
show create table t;
Table Create Table
t CREATE TABLE `t` (
`a` int(11) DEFAULT NULL,
`sys_trx_start` SYS_TRX_TYPE GENERATED ALWAYS AS ROW START,
`sys_trx_end` SYS_TRX_TYPE GENERATED ALWAYS AS ROW END,
PERIOD FOR SYSTEM_TIME (`sys_trx_start`, `sys_trx_end`)
`a` int(11) DEFAULT NULL
) ENGINE=INNODB_OR_MYISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
select * from t;
a
...
...
@@ -21,4 +18,36 @@ select a from t for system_time all;
a
2
1
set global system_versioning_transaction_registry=on;
Warnings:
Warning 4144 Transaction-based system versioning is EXPERIMENTAL and is subject to change in future.
create or replace table t (
a int,
s bigint unsigned as row start invisible,
e bigint unsigned as row end invisible,
period for system_time(s, e)
) with system versioning engine=innodb;
insert into t values (1);
update t set a=2;
insert into t values (3);
# shutdown server
# remove datadir
# xtrabackup move back
# restart server
show create table t;
Table Create Table
t CREATE TABLE `t` (
`a` int(11) DEFAULT NULL,
`s` bigint(20) unsigned GENERATED ALWAYS AS ROW START INVISIBLE,
`e` bigint(20) unsigned GENERATED ALWAYS AS ROW END INVISIBLE,
PERIOD FOR SYSTEM_TIME (`s`, `e`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
select * from t;
a
2
select a from t for system_time all;
a
2
1
drop table t;
set global system_versioning_transaction_registry=off;
mysql-test/suite/mariabackup/system_versioning.test
View file @
d6b68b0e
...
...
@@ -15,11 +15,38 @@ exec $XTRABACKUP --prepare --target-dir=$targetdir;
--
source
include
/
restart_and_restore
.
inc
--
enable_result_log
--
replace_result
"bigint unsigned"
SYS_TRX_TYPE
timestamp
(
6
)
SYS_TRX_TYPE
--
replace_result
InnoDB
INNODB_OR_MYISAM
MyISAM
INNODB_OR_MYISAM
"bigint(20) unsigned"
SYS_TRX_TYPE
timestamp
(
6
)
SYS_TRX_TYPE
--
replace_result
InnoDB
INNODB_OR_MYISAM
MyISAM
INNODB_OR_MYISAM
show
create
table
t
;
select
*
from
t
;
select
a
from
t
for
system_time
all
;
rmdir
$targetdir
;
set
global
system_versioning_transaction_registry
=
on
;
create
or
replace
table
t
(
a
int
,
s
bigint
unsigned
as
row
start
invisible
,
e
bigint
unsigned
as
row
end
invisible
,
period
for
system_time
(
s
,
e
)
)
with
system
versioning
engine
=
innodb
;
insert
into
t
values
(
1
);
update
t
set
a
=
2
;
--
disable_result_log
exec
$XTRABACKUP
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
my
.
cnf
--
backup
--
target
-
dir
=
$targetdir
;
--
enable_result_log
insert
into
t
values
(
3
);
--
disable_result_log
exec
$XTRABACKUP
--
prepare
--
target
-
dir
=
$targetdir
;
--
source
include
/
restart_and_restore
.
inc
--
enable_result_log
show
create
table
t
;
select
*
from
t
;
select
a
from
t
for
system_time
all
;
drop
table
t
;
set
global
system_versioning_transaction_registry
=
off
;
rmdir
$targetdir
;
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