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
5555fda8
Commit
5555fda8
authored
Jan 11, 2010
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make test case deterministic by replacing sleep with include/wait_condition.inc
parent
176ca9db
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
mysql-test/t/trigger.test
mysql-test/t/trigger.test
+11
-1
No files found.
mysql-test/t/trigger.test
View file @
5555fda8
...
@@ -1789,18 +1789,28 @@ CONNECTION rl_holder;
...
@@ -1789,18 +1789,28 @@ CONNECTION rl_holder;
SELECT
GET_LOCK
(
'B26162'
,
120
);
SELECT
GET_LOCK
(
'B26162'
,
120
);
CONNECTION
rl_acquirer
;
CONNECTION
rl_acquirer
;
let
$rl_acquirer_thread_id
=
`SELECT @@pseudo_thread_id`
;
--
send
--
send
SELECT
'rl_acquirer'
,
GET_LOCK
(
'B26162'
,
120
),
id
FROM
t2
WHERE
id
=
1
;
SELECT
'rl_acquirer'
,
GET_LOCK
(
'B26162'
,
120
),
id
FROM
t2
WHERE
id
=
1
;
CONNECTION
wl_acquirer
;
CONNECTION
wl_acquirer
;
let
$wl_acquirer_thread_id
=
`SELECT @@pseudo_thread_id`
;
SET
SESSION
LOW_PRIORITY_UPDATES
=
1
;
SET
SESSION
LOW_PRIORITY_UPDATES
=
1
;
SET
GLOBAL
LOW_PRIORITY_UPDATES
=
1
;
SET
GLOBAL
LOW_PRIORITY_UPDATES
=
1
;
#need to wait for rl_acquirer to lock on the B26162 lock
#need to wait for rl_acquirer to lock on the B26162 lock
sleep
2
;
let
$wait_condition
=
SELECT
STATE
=
'User lock'
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
ID
=
$rl_acquirer_thread_id
;
--
source
include
/
wait_condition
.
inc
--
send
--
send
INSERT
INTO
t1
VALUES
(
5
);
INSERT
INTO
t1
VALUES
(
5
);
CONNECTION
rl_contender
;
CONNECTION
rl_contender
;
# Wait until wl_acquirer is waiting for the read lock on t2 to be released.
let
$wait_condition
=
SELECT
STATE
=
'Locked'
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
ID
=
$wl_acquirer_thread_id
;
--
source
include
/
wait_condition
.
inc
# must not "see" the row inserted by the INSERT (as it must run before the
# must not "see" the row inserted by the INSERT (as it must run before the
# INSERT)
# INSERT)
--
send
--
send
...
...
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