Bug #9742 Put a SHOW LOCK TABLES
Submitted: 8 Apr 2005 3:54 Modified: 29 Mar 2011 18:31
Reporter: Roberto Spadim (Basic Quality Contributor) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:ALL OS:Any (ALL)
Assigned to: CPU Architecture:Any

[8 Apr 2005 3:54] Roberto Spadim
Description:
Put a SHOW LOCK to see what are blocking my tables to be writen, on many connections it's a problem to find the error

How to repeat:
SHOW LOCK
----------
| table | user or connection | lock id|
------------
UNLOCK <lock id>

Suggested fix:
puts 
unlock <id>
show lock
[8 Apr 2005 13:35] MySQL Verification Team
mysqladmin debug

provides sufficient info ..
[23 Feb 2010 14:37] Josh Duff
Wait, what?  That's it?  That's the reason for not adding an incredibly useful feature to the SHOW query?

I mean, you can check and repair tables from the command line, but it sure is handy to be able to do it with a query.

I will add my disgruntled voice toward this request.
[29 Mar 2011 18:31] Roberto Spadim
could be implemented?
show locks is a problem for ROW lock level since we can have mannnnnyyyy rows locked
maybe just SHOW PROCESSLIST could work
show locks is a more analytical thing (maybe when i have 1000cpus and 1000gb/s harddisks and a few users i could run it when mysql is running, not a feature to be done now... maybe in future to analise what engine is better to use ROW level lock PAGE level lock PARTITION level lock or TABLE level LOCK)