Bug #49047 InnoDB deadlock detection is CPU intensive with many locks on a single row
Submitted: 24 Nov 2009 17:55 Modified: 6 Oct 2010 18:11
Reporter: Harrison Fisk Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S5 (Performance)
Version:5.0,5.1,plugin OS:Any
Assigned to: John Russell CPU Architecture:Any
Tags: deadlock, innodb

File: Maximum allowed size is 50MB.
Description:
Privacy:

If the data you need to attach is more than 50MB, you should create a compressed archive of the data, split it to 50MB chunks, and upload each of them as a separate attachment.

To split a large file:

[24 Nov 2009 17:58] Harrison Fisk
Dtrace script which counts the number of queries being done and the calls to lock_rec_get_prev

Attachment: count_deadlock_walks.d (text/x-dsrc), 566 bytes.

[4 Dec 2009 20:37] Harrison Fisk
Small patch to switch from using lock_rec_read_prev to lock_rec_read_next

Attachment: deadlock_test.diff (text/x-patch), 981 bytes.

[6 Jan 2010 14:48] Harrison Fisk
Corrected patch to switch from using lock_rec_read_prev to lock_rec_read_next

Attachment: deadlock_cpu_v2.diff (text/x-patch), 1.88 KiB.