MySQL Forums
Forum List  »  InnoDB

Re: deadlock using lock tables with innodb on Athlon 64
Posted by: Marko Mäkelä
Date: May 13, 2005 04:59AM


There are two sets of locks involved with LOCK TABLES: a MySQL lock that exists until an explicit UNLOCK TABLES, and an InnoDB table lock that exists until the end of the transaction (which can be a lot shorter). The behavior was changed in 4.0.19 or so. In 4.0.12, LOCK TABLES only takes the MySQL lock and does not conflict with existing InnoDB operations on the table. Since 4.0.22 or so, there is a parameter innodb_table_locks for choosing the behavior. You most certainly want LOCK TABLES to acquire InnoDB table locks. Make sure that the transactions are not implicitly committed before UNLOCK TABLES.

Marko Mäkelä
Innobase Oy

Options: ReplyQuote

Written By
Re: deadlock using lock tables with innodb on Athlon 64
May 13, 2005 04:59AM

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.