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
3e7519f1
Commit
3e7519f1
authored
May 08, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix mdl_sync test to work now when ALTER TABLE .. ENGINE=xxx may be executed online
parent
c8ee83ee
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
mysql-test/r/mdl_sync.result
mysql-test/r/mdl_sync.result
+5
-6
mysql-test/t/mdl_sync.test
mysql-test/t/mdl_sync.test
+9
-2
No files found.
mysql-test/r/mdl_sync.result
View file @
3e7519f1
...
...
@@ -3086,18 +3086,17 @@ DELETE FROM t2 WHERE a = 3;
# Now that DELETE blocks on a metadata lock, we should be able to do
# SELECT * FROM m1 here. SELECT used to be blocked by a DELETE table
# lock request.
SELECT * FROM m1;
a
1
2
3
4
SELECT * FROM m1 WHERE a < 3;
# Resuming ALTER TABLE
SET DEBUG_SYNC= 'now SIGNAL continue';
# Connection con1
# Reaping: ALTER TABLE m1 engine=MERGE UNION=(t2, t1)
# Connection con2
# Reaping: DELETE FROM t2 WHERE a = 3
# Reaping: SELECT * FROM m1 WHERE a < 3
a
1
2
# Connection default
DROP TABLE m1, t1, t2;
SET DEBUG_SYNC= 'RESET';
mysql-test/t/mdl_sync.test
View file @
3e7519f1
...
...
@@ -4750,6 +4750,7 @@ INSERT INTO t2 VALUES (3), (4);
connect
(
con1
,
localhost
,
root
);
connect
(
con2
,
localhost
,
root
);
connect
(
con3
,
localhost
,
root
);
--
echo
# Connection con1
connection
con1
;
...
...
@@ -4769,7 +4770,7 @@ SET DEBUG_SYNC= 'now WAIT_FOR upgrade';
--
send
DELETE
FROM
t2
WHERE
a
=
3
--
echo
# Connection default
connection
default
;
connection
con3
;
--
echo
# Check that DELETE is waiting on a metadata lock and not a table lock.
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
information_schema
.
processlist
...
...
@@ -4779,7 +4780,9 @@ let $wait_condition=
--
echo
# Now that DELETE blocks on a metadata lock, we should be able to do
--
echo
# SELECT * FROM m1 here. SELECT used to be blocked by a DELETE table
--
echo
# lock request.
SELECT
*
FROM
m1
;
--
send
SELECT
*
FROM
m1
WHERE
a
<
3
connection
default
;
--
echo
# Resuming ALTER TABLE
SET
DEBUG_SYNC
=
'now SIGNAL continue'
;
...
...
@@ -4791,12 +4794,16 @@ connection con1;
connection
con2
;
--
echo
# Reaping: DELETE FROM t2 WHERE a = 3
--
reap
connection
con3
;
--
echo
# Reaping: SELECT * FROM m1 WHERE a < 3
--
reap
--
echo
# Connection default
connection
default
;
DROP
TABLE
m1
,
t1
,
t2
;
SET
DEBUG_SYNC
=
'RESET'
;
disconnect
con1
;
disconnect
con2
;
disconnect
con3
;
# Check that all connections opened by test cases in this file are really
...
...
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