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
6999da9b
Commit
6999da9b
authored
Jun 06, 2019
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Record BACKUP and SCHEMA namespaces order
parent
965db355
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
0 deletions
+63
-0
mysql-test/main/backup_lock_debug.result
mysql-test/main/backup_lock_debug.result
+25
-0
mysql-test/main/backup_lock_debug.test
mysql-test/main/backup_lock_debug.test
+38
-0
No files found.
mysql-test/main/backup_lock_debug.result
View file @
6999da9b
...
...
@@ -26,3 +26,28 @@ disconnect con1;
connection default;
DROP TABLE t1;
SET DEBUG_SYNC= 'RESET';
#
# Demonstrates a deadlock if BACKUP namespace is reorder after SCHEMA.
# Culprit is ALTER TABLE taking SCHEMA lock on target database after
# BACKUP lock was acquired.
#
CREATE DATABASE test2;
CREATE TABLE t1(a INT) ENGINE=InnoDB;
SET DEBUG_SYNC='alter_opened_table SIGNAL ready WAIT_FOR go';
ALTER TABLE t1 RENAME TO test2.t1;
connect con1,localhost,root,,;
SET DEBUG_SYNC='now WAIT_FOR ready';
BACKUP STAGE START;
SET DEBUG_SYNC='mdl_acquire_lock_wait SIGNAL ready1';
BACKUP STAGE BLOCK_DDL;
connect con2,localhost,root,,;
SET DEBUG_SYNC='now WAIT_FOR ready1';
SET DEBUG_SYNC='mdl_acquire_lock_wait SIGNAL go';
DROP DATABASE test2;
connection default;
connection con1;
disconnect con1;
connection con2;
disconnect con2;
connection default;
SET DEBUG_SYNC='reset';
mysql-test/main/backup_lock_debug.test
View file @
6999da9b
...
...
@@ -3,6 +3,7 @@
########################################################################
--
source
include
/
have_debug_sync
.
inc
--
source
include
/
have_innodb
.
inc
--
echo
#
--
echo
# Make sure pending LOCK TABLES doesn't block BACKUP STAGE
...
...
@@ -38,3 +39,40 @@ disconnect con1;
connection
default
;
DROP
TABLE
t1
;
SET
DEBUG_SYNC
=
'RESET'
;
--
echo
#
--
echo
# Demonstrates a deadlock if BACKUP namespace is reorder after SCHEMA.
--
echo
# Culprit is ALTER TABLE taking SCHEMA lock on target database after
--
echo
# BACKUP lock was acquired.
--
echo
#
CREATE
DATABASE
test2
;
CREATE
TABLE
t1
(
a
INT
)
ENGINE
=
InnoDB
;
SET
DEBUG_SYNC
=
'alter_opened_table SIGNAL ready WAIT_FOR go'
;
send
ALTER
TABLE
t1
RENAME
TO
test2
.
t1
;
connect
(
con1
,
localhost
,
root
,,);
SET
DEBUG_SYNC
=
'now WAIT_FOR ready'
;
BACKUP
STAGE
START
;
SET
DEBUG_SYNC
=
'mdl_acquire_lock_wait SIGNAL ready1'
;
send
BACKUP
STAGE
BLOCK_DDL
;
connect
(
con2
,
localhost
,
root
,,);
SET
DEBUG_SYNC
=
'now WAIT_FOR ready1'
;
SET
DEBUG_SYNC
=
'mdl_acquire_lock_wait SIGNAL go'
;
send
DROP
DATABASE
test2
;
connection
default
;
reap
;
connection
con1
;
reap
;
disconnect
con1
;
connection
con2
;
reap
;
disconnect
con2
;
connection
default
;
SET
DEBUG_SYNC
=
'reset'
;
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