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
0491127e
Commit
0491127e
authored
Mar 31, 2010
by
Vasil Dimov
Browse files
Options
Browse Files
Download
Plain Diff
Merge from innodb-branches-5.1
parents
477016ae
8df40564
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
5 deletions
+58
-5
storage/innobase/mysql-test/innodb_bug51920.result
storage/innobase/mysql-test/innodb_bug51920.result
+18
-0
storage/innobase/mysql-test/innodb_bug51920.test
storage/innobase/mysql-test/innodb_bug51920.test
+33
-0
storage/innobase/srv/srv0srv.c
storage/innobase/srv/srv0srv.c
+7
-5
No files found.
storage/innobase/mysql-test/innodb_bug51920.result
0 → 100644
View file @
0491127e
CREATE TABLE bug51920 (i INT) ENGINE=InnoDB;
INSERT INTO bug51920 VALUES (1);
BEGIN;
SELECT * FROM bug51920 FOR UPDATE;
i
1
UPDATE bug51920 SET i=2;
SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE INFO="UPDATE bug51920 SET i=2"
INTO @thread_id;
KILL @thread_id;
SELECT sleep(2);
sleep(2)
0
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID=@thread_id;
ID USER HOST DB COMMAND TIME STATE INFO
ERROR 70100: Query execution was interrupted
DROP TABLE bug51920;
storage/innobase/mysql-test/innodb_bug51920.test
0 → 100644
View file @
0491127e
#
# Bug #51920: InnoDB connections in lock wait ignore KILL until timeout
#
--
source
include
/
not_embedded
.
inc
--
source
include
/
have_innodb
.
inc
CREATE
TABLE
bug51920
(
i
INT
)
ENGINE
=
InnoDB
;
INSERT
INTO
bug51920
VALUES
(
1
);
BEGIN
;
SELECT
*
FROM
bug51920
FOR
UPDATE
;
connect
(
con1
,
localhost
,
root
,,);
connection
con1
;
--
send
UPDATE
bug51920
SET
i
=
2
;
connection
default
;
SELECT
ID
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
INFO
=
"UPDATE bug51920 SET i=2"
INTO
@
thread_id
;
KILL
@
thread_id
;
SELECT
sleep
(
2
);
SELECT
*
FROM
INFORMATION_SCHEMA
.
PROCESSLIST
WHERE
ID
=@
thread_id
;
connection
con1
;
--
error
ER_QUERY_INTERRUPTED
reap
;
connection
default
;
DROP
TABLE
bug51920
;
--
disconnect
con1
storage/innobase/srv/srv0srv.c
View file @
0491127e
...
...
@@ -1554,8 +1554,9 @@ srv_suspend_mysql_thread(
mutex_exit
(
&
kernel_mutex
);
if
(
srv_lock_wait_timeout
<
100000000
&&
wait_time
>
(
double
)
srv_lock_wait_timeout
)
{
if
(
trx_is_interrupted
(
trx
)
||
(
srv_lock_wait_timeout
<
100000000
&&
wait_time
>
(
double
)
srv_lock_wait_timeout
))
{
trx
->
error_state
=
DB_LOCK_WAIT_TIMEOUT
;
}
...
...
@@ -2104,9 +2105,10 @@ srv_lock_timeout_thread(
wait_time
=
ut_difftime
(
ut_time
(),
slot
->
suspend_time
);
if
(
srv_lock_wait_timeout
<
100000000
&&
(
wait_time
>
(
double
)
srv_lock_wait_timeout
||
wait_time
<
0
))
{
if
(
trx_is_interrupted
(
thr_get_trx
(
slot
->
thr
))
||
(
srv_lock_wait_timeout
<
100000000
&&
(
wait_time
>
(
double
)
srv_lock_wait_timeout
||
wait_time
<
0
)))
{
/* Timeout exceeded or a wrap-around in system
time counter: cancel the lock request queued
...
...
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