Details
Description
The attached program TryTimeout.java should detect a deadlock but instead throws a lock timeout exception. The program has two threads that attempt:
threadConnection.setAutoCommit(false);
/* set isolation level to repeatable read */
threadConnection.setTransactionIsolation(Connection.TRANSACTION_REPEATABLE_READ);
ResultSet rs = stmt.executeQuery("select * from t where i = 456");
while (rs.next());
stmt.executeUpdate("update t set i = 456 where i = 456");
threadConnection.commit();
This gives SQLState 40001 (deadlock) with DB2 but a lock timeout with Derby.
Attachments
Attachments
Issue Links
- is duplicated by
-
DERBY-5073 Derby deadlocks without recourse on simultaneous correlated subqueries
- Closed
- is related to
-
DERBY-2877 Print the entire lock list when a deadlock occurs and deadlock tracing is on
- Closed
- relates to
-
DERBY-5137 Enable or remove Derby3980DeadlockTest
- Open