Bug #7819 Please show full query in InnoDB status Last Deadlock
Submitted: 11 Jan 2005 20:07 Modified: 12 Aug 2005 20:08
Reporter: Richard Cook Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:4.0.22 OS:Windows (Windows, Linux)
Assigned to: Osku Salerma CPU Architecture:Any

[11 Jan 2005 20:07] Richard Cook
Description:
The Last Deadlock detector is very useful in the InnoDB status view. Unfortunatley, it does not show the full query that caused the deadlock. This makes it very difficult to use this screen for application debugging purposes. Without the full query, you can not see what query parameters may have caused record locks, etc. Please consider showing the full query, instead of cutting it off.

How to repeat:
Write a long query and have it deadlock with another long query. You'll see it is cut off in the last detected deadlock view.

Suggested fix:
Don't cut off the query
[11 Jan 2005 23:03] Heikki Tuuri
Marko,

maybe we should show more, 500 bytes, for example? I am reluctant to show the full query, because they can be mighty long.

Regards,

Heikki
[11 Jan 2005 23:33] Richard Cook
Is it because of not wanting to create long logs? Maybe add a new startup parameter, so users who may need to capture longer queries can override the default query length
[5 Aug 2005 13:13] Heikki Tuuri
Assigning this to Osku.
[12 Aug 2005 8:40] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/28212
[12 Aug 2005 13:44] Heikki Tuuri
Fixed in 5.0.12.
[12 Aug 2005 20:08] Paul DuBois
Noted in 5.0.12 changelog.