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
45e1c9bb
Commit
45e1c9bb
authored
Feb 15, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: remove a pretty formatting function from a test
parent
9fa715b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
25 deletions
+16
-25
mysql-test/suite/versioning/r/trx_id.result
mysql-test/suite/versioning/r/trx_id.result
+12
-16
mysql-test/suite/versioning/t/trx_id.test
mysql-test/suite/versioning/t/trx_id.test
+4
-9
No files found.
mysql-test/suite/versioning/r/trx_id.result
View file @
45e1c9bb
...
...
@@ -6,9 +6,6 @@ period for system_time (sys_trx_start, sys_trx_end)
) with system versioning engine innodb;
insert into t1 (x) values (1);
# ALTER ADD SYSTEM VERSIONING should write to mysql.transaction_registry
create function check_result (cond boolean)
returns char(50) deterministic
return if(cond = 1, '[CORRECT]', '[INCORRECT]');
set @@system_versioning_alter_history=keep;
create or replace table t1 (x int) engine innodb;
insert into t1 values (1);
...
...
@@ -19,9 +16,9 @@ add period for system_time(s, e),
add system versioning,
algorithm=inplace;
select s from t1 into @trx_start;
select c
heck_result(count(*) = 1)
from mysql.transaction_registry where transaction_id = @trx_start;
c
heck_result(count(*) = 1)
[CORRECT]
select c
ount(*) = 1
from mysql.transaction_registry where transaction_id = @trx_start;
c
ount(*) = 1
1
create or replace table t1 (x int) engine innodb;
select count(*) from mysql.transaction_registry into @tmp;
alter table t1
...
...
@@ -30,9 +27,9 @@ add column e bigint unsigned as row end,
add period for system_time(s, e),
add system versioning,
algorithm=inplace;
select c
heck_result(count(*) = @tmp)
from mysql.transaction_registry;
c
heck_result(count(*) = @tmp)
[CORRECT]
select c
ount(*) = @tmp
from mysql.transaction_registry;
c
ount(*) = @tmp
1
create or replace table t1 (x int) engine innodb;
insert into t1 values (1);
alter table t1
...
...
@@ -42,9 +39,9 @@ add period for system_time(s, e),
add system versioning,
algorithm=copy;
select s from t1 into @trx_start;
select c
heck_result(count(*) = 1)
from mysql.transaction_registry where transaction_id = @trx_start;
c
heck_result(count(*) = 1)
[CORRECT]
select c
ount(*) = 1
from mysql.transaction_registry where transaction_id = @trx_start;
c
ount(*) = 1
1
create or replace table t1 (x int) engine innodb;
select count(*) from mysql.transaction_registry into @tmp;
alter table t1
...
...
@@ -53,9 +50,9 @@ add column e bigint unsigned as row end,
add period for system_time(s, e),
add system versioning,
algorithm=copy;
select c
heck_result(count(*) = @tmp + 1)
from mysql.transaction_registry;
c
heck_result(count(*) = @tmp + 1)
[CORRECT]
select c
ount(*) = @tmp + 1
from mysql.transaction_registry;
c
ount(*) = @tmp + 1
1
# TRX_ID to TIMESTAMP versioning switch
create or replace table t1 (
x int,
...
...
@@ -69,4 +66,3 @@ select row_end = 18446744073709551615 as transaction_based from t1 for system_ti
transaction_based
1
drop table t1;
drop function check_result;
mysql-test/suite/versioning/t/trx_id.test
View file @
45e1c9bb
...
...
@@ -11,10 +11,6 @@ create or replace table t1 (
insert
into
t1
(
x
)
values
(
1
);
--
echo
# ALTER ADD SYSTEM VERSIONING should write to mysql.transaction_registry
create
function
check_result
(
cond
boolean
)
returns
char
(
50
)
deterministic
return
if
(
cond
=
1
,
'[CORRECT]'
,
'[INCORRECT]'
);
set
@@
system_versioning_alter_history
=
keep
;
create
or
replace
table
t1
(
x
int
)
engine
innodb
;
...
...
@@ -26,7 +22,7 @@ alter table t1
add
system
versioning
,
algorithm
=
inplace
;
select
s
from
t1
into
@
trx_start
;
select
c
heck_result
(
count
(
*
)
=
1
)
from
mysql
.
transaction_registry
where
transaction_id
=
@
trx_start
;
select
c
ount
(
*
)
=
1
from
mysql
.
transaction_registry
where
transaction_id
=
@
trx_start
;
create
or
replace
table
t1
(
x
int
)
engine
innodb
;
select
count
(
*
)
from
mysql
.
transaction_registry
into
@
tmp
;
...
...
@@ -36,7 +32,7 @@ alter table t1
add
period
for
system_time
(
s
,
e
),
add
system
versioning
,
algorithm
=
inplace
;
select
c
heck_result
(
count
(
*
)
=
@
tmp
)
from
mysql
.
transaction_registry
;
select
c
ount
(
*
)
=
@
tmp
from
mysql
.
transaction_registry
;
create
or
replace
table
t1
(
x
int
)
engine
innodb
;
insert
into
t1
values
(
1
);
...
...
@@ -47,7 +43,7 @@ alter table t1
add
system
versioning
,
algorithm
=
copy
;
select
s
from
t1
into
@
trx_start
;
select
c
heck_result
(
count
(
*
)
=
1
)
from
mysql
.
transaction_registry
where
transaction_id
=
@
trx_start
;
select
c
ount
(
*
)
=
1
from
mysql
.
transaction_registry
where
transaction_id
=
@
trx_start
;
create
or
replace
table
t1
(
x
int
)
engine
innodb
;
select
count
(
*
)
from
mysql
.
transaction_registry
into
@
tmp
;
...
...
@@ -58,7 +54,7 @@ alter table t1
add
system
versioning
,
algorithm
=
copy
;
# With MDEV-14511 the transaction will be registered even for empty tables.
select
c
heck_result
(
count
(
*
)
=
@
tmp
+
1
)
from
mysql
.
transaction_registry
;
select
c
ount
(
*
)
=
@
tmp
+
1
from
mysql
.
transaction_registry
;
--
echo
# TRX_ID to TIMESTAMP versioning switch
create
or
replace
table
t1
(
...
...
@@ -72,4 +68,3 @@ alter table t1 drop column sys_start, drop column sys_end;
select
row_end
=
18446744073709551615
as
transaction_based
from
t1
for
system_time
all
;
drop
table
t1
;
drop
function
check_result
;
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