MySQL Forums
Forum List  »  General

Lock wait timeout exceeded; try restarting transaction
Posted by: Harshdeep Khatri
Date: February 13, 2012 12:30AM

Hello All,

I am receving subjected error from mysql following is my mysql infroamtion.

mysql Ver 14.14 Distrib 5.1.54, for debian-linux-gnu (x86_64) using readline 6.1

Everything seems working since long and suddenly today this error was generated on followig query.

UPDATE identity SET lastunkid=:lastunkid WHERE tablename = :tablename AND hotel_code=:hotel_code

this is my own logic to generate custom auto primary key, I have not used any transaction or lock statement for concurrency then also I am seeing intended row was some how get locked (I think it is own innodb row locks not my transaction lock) and my update query start generating errors like this becuase i have default 50 value for innodb_lock_wait_timeout variable.

I have also check the table for corruption it is also showing normal to me.

Please also not that for backup I am using mysqldump without any locks.

Can anyone spot some light and share some information how exactly my row was get locked automatically so other query didn't get access of that row ?

Options: ReplyQuote




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.