Bug #56396 A system view to inspect table locks
Submitted: 31 Aug 2010 5:28 Modified: 10 Feb 2011 12:58
Reporter: Mikiya Okuno Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Information schema Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[31 Aug 2010 5:28] Mikiya Okuno
Description:
While it is not possible to determine which thread locks which table or which thread holds the global read lock, we often want to see this information. Neither of SHOW PROCESSLIST, SHOW TABLE STATUS or SHOW OPEN TABLES can retrieve such information. But we often want to know the lock status especially when a DBA missed to unlock tables and tables are left locked for long time.

How to repeat:
n/a: feature request

Suggested fix:
Please add a new system view to INFORMATION_SCHEMA which displays table/global lock information. The expected columns are thd->thread_id, thd->security_ctx->user/host, thd->global_read_lock and thd->locked_tables.