MySQL Forums
Forum List  »  MyISAM

Re: How to identify which connection has locked a particular table
Posted by: Rick James
Date: November 27, 2011 11:12PM

Aha. I see the point.

Connection 7 still has some lock(s) on the table. This is because you did not say BEGIN, did not disconnect (yet), and have AUTOCOMMIT=OFF. Furthermore, the PROCESSLIST shows "Sleep" because you are between the SELECT and the COMMIT (or something else that would terminate the implied transaction).

I would say this is a good argument against using AUTOCOMMIT=OFF.

I prefer to have AUTOCOMMIT=ON for casual stuff, then explicitly use BEGIN...COMMIT around things that I want to be transactional. I dislike the open-ended nature of AUTOCOMMIT=OFF, and now I understand why I dislike it.

So, I would say it is not a "bug", but that it would be nice to have a feature that gives us a clue (in PROCESSLIST?) of who is waiting on whom.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to identify which connection has locked a particular table
1991
November 27, 2011 11:12PM


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.