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
177e4775
Commit
177e4775
authored
Jun 29, 2017
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: VTQ iso_level check fix
parent
229c5281
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
37 deletions
+50
-37
mysql-test/suite/versioning/r/commit_id.result
mysql-test/suite/versioning/r/commit_id.result
+25
-19
mysql-test/suite/versioning/t/commit_id.test
mysql-test/suite/versioning/t/commit_id.test
+25
-18
No files found.
mysql-test/suite/versioning/r/commit_id.result
View file @
177e4775
...
...
@@ -64,26 +64,7 @@ create table t1(
id int auto_increment primary key)
with system versioning
engine innodb;
set transaction isolation level read uncommitted;
insert into t1 values ();
select iso_level = 'RU' from information_schema.innodb_vtq limit 1;
iso_level = 'RU'
1
set transaction isolation level read committed;
insert into t1 values ();
select iso_level = 'RC' from information_schema.innodb_vtq limit 1;
iso_level = 'RC'
1
set transaction isolation level serializable;
insert into t1 values ();
select iso_level = 'S' from information_schema.innodb_vtq limit 1;
iso_level = 'S'
1
set transaction isolation level repeatable read;
insert into t1 values ();
select iso_level = 'RR' from information_schema.innodb_vtq limit 1;
iso_level = 'RR'
1
set @ts0= now(6);
insert into t1 values ();
select sys_trx_start from t1 where id = last_insert_id() into @tx0;
...
...
@@ -135,6 +116,30 @@ vtq_trx_sees(0, @tx2) is null as F,
vtq_trx_sees(-1, @tx2) as H;
A B C D E F H
1 1 1 1 1 1 1
set transaction isolation level read uncommitted;
insert into t1 values ();
select sys_trx_start from t1 where id = last_insert_id() into @tx3;
select iso_level = 'RU' from information_schema.innodb_vtq where trx_id = @tx3;
iso_level = 'RU'
1
set transaction isolation level read committed;
insert into t1 values ();
select sys_trx_start from t1 where id = last_insert_id() into @tx4;
select iso_level = 'RC' from information_schema.innodb_vtq where trx_id = @tx4;
iso_level = 'RC'
1
set transaction isolation level serializable;
insert into t1 values ();
select sys_trx_start from t1 where id = last_insert_id() into @tx5;
select iso_level = 'S' from information_schema.innodb_vtq where trx_id = @tx5;
iso_level = 'S'
1
set transaction isolation level repeatable read;
insert into t1 values ();
select sys_trx_start from t1 where id = last_insert_id() into @tx6;
select iso_level = 'RR' from information_schema.innodb_vtq where trx_id = @tx6;
iso_level = 'RR'
1
drop table t1;
call verify_vtq;
No A B C D
...
...
@@ -145,6 +150,7 @@ No A B C D
5 1 1 1 1
6 1 1 1 1
7 1 1 1 1
8 1 1 1 1
drop procedure verify_vtq;
drop procedure innodb_verify_vtq;
drop function default_engine;
...
...
mysql-test/suite/versioning/t/commit_id.test
View file @
177e4775
...
...
@@ -6,26 +6,9 @@ with system versioning
engine
innodb
;
# VTQ_ISO_LEVEL #
set
transaction
isolation
level
read
uncommitted
;
insert
into
t1
values
();
select
iso_level
=
'RU'
from
information_schema
.
innodb_vtq
limit
1
;
set
transaction
isolation
level
read
committed
;
insert
into
t1
values
();
select
iso_level
=
'RC'
from
information_schema
.
innodb_vtq
limit
1
;
set
transaction
isolation
level
serializable
;
insert
into
t1
values
();
select
iso_level
=
'S'
from
information_schema
.
innodb_vtq
limit
1
;
# VTQ_TRX_ID, VTQ_COMMIT_ID, VTQ_TRX_SEES #
set
transaction
isolation
level
repeatable
read
;
insert
into
t1
values
();
select
iso_level
=
'RR'
from
information_schema
.
innodb_vtq
limit
1
;
# VTQ_TRX_ID, VTQ_COMMIT_ID, VTQ_TRX_SEES #
set
@
ts0
=
now
(
6
);
insert
into
t1
values
();
...
...
@@ -73,6 +56,30 @@ select
vtq_trx_sees
(
0
,
@
tx2
)
is
null
as
F
,
vtq_trx_sees
(
-
1
,
@
tx2
)
as
H
;
# VTQ_ISO_LEVEL #
set
transaction
isolation
level
read
uncommitted
;
insert
into
t1
values
();
select
sys_trx_start
from
t1
where
id
=
last_insert_id
()
into
@
tx3
;
select
iso_level
=
'RU'
from
information_schema
.
innodb_vtq
where
trx_id
=
@
tx3
;
set
transaction
isolation
level
read
committed
;
insert
into
t1
values
();
select
sys_trx_start
from
t1
where
id
=
last_insert_id
()
into
@
tx4
;
select
iso_level
=
'RC'
from
information_schema
.
innodb_vtq
where
trx_id
=
@
tx4
;
set
transaction
isolation
level
serializable
;
insert
into
t1
values
();
select
sys_trx_start
from
t1
where
id
=
last_insert_id
()
into
@
tx5
;
select
iso_level
=
'S'
from
information_schema
.
innodb_vtq
where
trx_id
=
@
tx5
;
set
transaction
isolation
level
repeatable
read
;
insert
into
t1
values
();
select
sys_trx_start
from
t1
where
id
=
last_insert_id
()
into
@
tx6
;
select
iso_level
=
'RR'
from
information_schema
.
innodb_vtq
where
trx_id
=
@
tx6
;
drop
table
t1
;
call
verify_vtq
;
...
...
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