MySQL Forums
Forum List  »  Newbie

Lock wait timeout exceeded; try restarting transaction
Posted by: Bill Denniston
Date: July 12, 2014 05:47PM

A simple INNODB table has an INT primary key, an INT foreign key, and a UNIQUE INDEX consisting of an INT and a DATETIME. The purpose of the UNIQUE INDEX is to prevent insertion of duplicate records with the same INT and DATETIME values. A series of tests confirm proper operation of all normal CRUD operations on the table. An attempt to insert a duplicate that violates an existing record's UNIQUE INDEX value throws an SQLException (in Java using Connector/J) as expected. Subsequent SELECT operations perform normally. However, subsequent attempts to UPDATE (update or delete records or to drop the table) fail by throwing the exception given and waiting for the lock period to timeout on each attempt.

How can I avoid or release the lock? Many thanks for any suggestions.

Options: ReplyQuote


Subject
Written By
Posted
Lock wait timeout exceeded; try restarting transaction
July 12, 2014 05:47PM


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.