MySQL Forums
Forum List  »  MyISAM

How to identify which connection has locked a particular table
Posted by: Veerabahu Subramanian
Date: November 21, 2011 07:50AM

Alter query in our application hangs saying that " Waiting for table metadata lock". This comes as a surprise, since I don't really see a concept of transaction or need for commit in tables using MyISAM storage engines. However understood the purpose of it after reading

Now my question is, how to identify which connection among the list of connections shown in show processlist has made a transaction and that is not commited. In simple, how to identify the other connection due to which the current alter table is hanging. Also let us know if there is any procedure by which we can traceback the connection to application code.
Note that in application using connection pool, it could be long back that some select query happened on a table and now alter table is happening, that hangs.


Options: ReplyQuote

Written By
How to identify which connection has locked a particular table
November 21, 2011 07:50AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.