Bug #65531 | InnoDB DeadLock with all X mode waiting by various non-trans DML | ||
---|---|---|---|
Submitted: | 6 Jun 2012 9:27 | Modified: | 29 Jan 2013 18:37 |
Reporter: | wei liu | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S2 (Serious) |
Version: | 5.5.16 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | deadlock, indexes, innodb, no gap waiting, non-trans, x mode |
[6 Jun 2012 9:27]
wei liu
[6 Jun 2012 9:28]
wei liu
create test table and insert data
Attachment: 1.Tab_Data.sql (application/octet-stream, text), 562 bytes.
[6 Jun 2012 9:29]
wei liu
con-current sql script 01
Attachment: 2.Test_Script01.sql (application/octet-stream, text), 394.89 KiB.
[6 Jun 2012 9:29]
wei liu
con-current sql script 02
Attachment: 3.Test_Script02.sql (application/octet-stream, text), 358.47 KiB.
[6 Jun 2012 9:29]
wei liu
log
Attachment: 4.DeadLock_Log.txt (text/plain), 1.92 KiB.
[3 Jul 2012 1:44]
wei liu
Any update?
[29 Jan 2013 18:37]
Sveta Smirnova
Thank you for the report. This is not a bug. See at the deadlock output: *** (1) TRANSACTION: TRANSACTION 1D0AB, ACTIVE 0 sec fetching rows mysql tables in use 1, locked 1 LOCK WAIT 4 lock struct(s), heap size 320, 10 row lock(s), undo log entries 4 MySQL thread id 14, OS thread handle 0x340, query id 77916 192.168.253.220 root Updating update tt01 set status = 2 where name <'e' .... *** (2) TRANSACTION: TRANSACTION 1D0A9, ACTIVE 0 sec updating or deleting mysql tables in use 1, locked 1 3 lock struct(s), heap size 320, 2 row lock(s), undo log entries 1 MySQL thread id 19, OS thread handle 0x6c8, query id 77915 192.168.253.220 root updating delete from tt01 where id=5 and name = 'e' In this period of time row with name = 'e' exists and two transactions compete for this very same row. Since index on column name is not unique this can lead to deadlocks.