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
be6c4f5d
Commit
be6c4f5d
authored
Jul 29, 2017
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More post-merge updates to get the tests pass
parent
a89d01fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
4 deletions
+79
-4
storage/rocksdb/mysql-test/rocksdb/include/deadlock_stats.inc
...age/rocksdb/mysql-test/rocksdb/include/deadlock_stats.inc
+46
-0
storage/rocksdb/mysql-test/rocksdb/include/simple_deadlock.inc
...ge/rocksdb/mysql-test/rocksdb/include/simple_deadlock.inc
+29
-0
storage/rocksdb/mysql-test/rocksdb/r/varbinary_format.result
storage/rocksdb/mysql-test/rocksdb/r/varbinary_format.result
+4
-4
No files found.
storage/rocksdb/mysql-test/rocksdb/include/deadlock_stats.inc
0 → 100644
View file @
be6c4f5d
let
$prior_set_lwt
=
`select concat('set @prior_lock_wait_timeout = @@',
'$engine', '_lock_wait_timeout;')`
;
let
$prior_set_dld
=
`select concat('set @prior_deadlock_detect = @@',
'$engine', '_deadlock_detect;')`
;
let
$global_dld
=
`select concat('set global ', '$engine',
'_deadlock_detect = on;')`
;
let
$global_lwt
=
`select concat('set global ', '$engine',
'_lock_wait_timeout = 100000;')`
;
eval
$prior_set_lwt
$prior_set_dld
$global_dld
$global_lwt
;
--
source
include
/
count_sessions
.
inc
connect
(
con1
,
localhost
,
root
,,);
let
$con1
=
`SELECT CONNECTION_ID()`
;
connect
(
con2
,
localhost
,
root
,,);
let
$con2
=
`SELECT CONNECTION_ID()`
;
connection
default
;
eval
create
table
t
(
i
int
primary
key
)
engine
=
$engine
;
insert
into
t
values
(
1
),
(
2
),
(
3
);
--
source
include
/
simple_deadlock
.
inc
connection
default
;
select
row_lock_deadlocks
from
information_schema
.
table_statistics
where
table_name
=
"t"
;
select
row_lock_deadlocks
from
information_schema
.
table_statistics
where
table_name
=
"t"
;
--
source
include
/
simple_deadlock
.
inc
connection
default
;
select
row_lock_deadlocks
from
information_schema
.
table_statistics
where
table_name
=
"t"
;
select
row_lock_deadlocks
from
information_schema
.
table_statistics
where
table_name
=
"t"
;
disconnect
con1
;
disconnect
con2
;
let
$restore_lwt
=
`select concat('set global ', '$engine',
'_lock_wait_timeout = @prior_lock_wait_timeout;')`
;
let
$restore_dld
=
`select concat('set global ', '$engine',
'_deadlock_detect = @prior_deadlock_detect;')`
;
eval
$restore_lwt
$restore_dld
;
drop
table
t
;
--
source
include
/
wait_until_count_sessions
.
inc
storage/rocksdb/mysql-test/rocksdb/include/simple_deadlock.inc
0 → 100644
View file @
be6c4f5d
connection
con1
;
begin
;
select
*
from
t
where
i
=
1
for
update
;
connection
con2
;
begin
;
select
*
from
t
where
i
=
2
for
update
;
connection
con1
;
--
send
select
*
from
t
where
i
=
2
for
update
connection
con2
;
if
(
$engine
==
"rocksdb"
){
let
$wait_condition
=
select
count
(
*
)
=
1
from
information_schema
.
rocksdb_trx
where
thread_id
=
$con1
and
waiting_key
!=
""
;
}
if
(
$engine
==
"innodb"
){
let
$wait_condition
=
select
count
(
*
)
=
1
from
information_schema
.
innodb_trx
where
trx_mysql_thread_id
=
$con1
and
trx_state
=
"LOCK WAIT"
;
}
--
source
include
/
wait_condition
.
inc
--
error
ER_LOCK_DEADLOCK
select
*
from
t
where
i
=
1
for
update
;
rollback
;
connection
con1
;
--
reap
rollback
;
storage/rocksdb/mysql-test/rocksdb/r/varbinary_format.result
View file @
be6c4f5d
...
...
@@ -62,11 +62,11 @@ SUBSTRING(a.key,9)
000000000000000009000000000000000009000000000000000009000000000000000009000000000000000001
ROLLBACK;
DROP TABLE t1;
set session debug= '+d,MYROCKS_LEGACY_VARBINARY_FORMAT';
set session debug
_dbug
= '+d,MYROCKS_LEGACY_VARBINARY_FORMAT';
CREATE TABLE t1(
vb VARBINARY(64) primary key
) ENGINE=rocksdb;
set session debug= '-d,MYROCKS_LEGACY_VARBINARY_FORMAT';
set session debug
_dbug
= '-d,MYROCKS_LEGACY_VARBINARY_FORMAT';
INSERT INTO t1 values(0x00);
INSERT INTO t1 values(0x0000);
INSERT INTO t1 values(0x0000000000000000);
...
...
@@ -192,11 +192,11 @@ SUBSTRING(a.key,9)
616161616161616109616161616161616109616161616161616109616161616161616109610000000000000001
ROLLBACK;
DROP TABLE t1;
set session debug= '+d,MYROCKS_LEGACY_VARBINARY_FORMAT';
set session debug
_dbug
= '+d,MYROCKS_LEGACY_VARBINARY_FORMAT';
CREATE TABLE t1(
vc VARCHAR(64) collate 'binary' primary key
) ENGINE=rocksdb;
set session debug= '-d,MYROCKS_LEGACY_VARBINARY_FORMAT';
set session debug
_dbug
= '-d,MYROCKS_LEGACY_VARBINARY_FORMAT';
INSERT INTO t1 values('a');
INSERT INTO t1 values('aa');
INSERT INTO t1 values('aaaaaaaa');
...
...
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