MySQL Forums
Forum List  »  General

Clarification Needed: innodb_lock_wait_timeout and version 4.0.20+
Posted by: Lukas Bradley
Date: November 03, 2004 10:09AM

I'm in need of a clarification about the innodb_lock_wait_timeout system variable.


Quote

innodb_lock_wait_timeout

The timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. InnoDB automatically detects transaction deadlocks in its own lock table and rolls back the transaction. Beginning with MySQL 4.0.20 and 4.1.2, InnoDB notices locks set using the LOCK TABLES statement. Before that, if you use the LOCK TABLES statement, or other transaction-safe storage engines than InnoDB in the same transaction, a deadlock may arise that InnoDB cannot notice. In cases like this, the timeout is useful to resolve the situation. The default is 50 seconds.

http://dev.mysql.com/doc/mysql/en/InnoDB_start.html

Does this mean that before version 4.0.20, certain non-locked transactions were being falsely reported as locked? Or, is it saying that some deadlocks were not being detected before 4.0.20?

I'm getting the following message recently using 4.0.16:

2004-11-03 10:05:22,471 [Thread-5] ERROR dollars.bo.timeframe.RpmTimeframeSinceThreeMonth - Exception while calculating RPM values on process
'[Ldollars.bo.timeframe.RpmTimeframeProcess;'
java.sql.SQLException: General error, message from server: "Deadlock found when trying to get lock; Try restarting transaction"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1651)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:889)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:956)
at com.mysql.jdbc.Connection.execSQL(Connection.java:1874)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1351)
at dollars.bo.AdsBO.processTimeframe(AdsBO.java:2328)
at dollars.bo.timeframe.RpmTimeframeTask.run(RpmTimeframeTask.java:70)
at java.util.TimerThread.mainLoop(Timer.java:432)
at java.util.TimerThread.run(Timer.java:382)

Will increasing this time help this?

Options: ReplyQuote


Subject
Written By
Posted
Clarification Needed: innodb_lock_wait_timeout and version 4.0.20+
November 03, 2004 10:09AM


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.