db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Korneliussen <Andreas.Kornelius...@Sun.COM>
Subject Re: Question on SUR and U lock.
Date Wed, 23 Aug 2006 20:24:12 GMT
Sunitha Kambhampati wrote:
> I was doing some testing for SUR and had a question about the expected
> behavior.
> The SUR related doc on
> http://db.apache.org/derby/docs/dev/devguide/rdevconceptssur.html  says
> "The row which the cursor is positioned on is locked, however once it
> moves to another row,
> the lock may be released depending on transaction isolation level."
> In my test (isolation level is default - RC),   I have a SUR, resultset
> has 1000 rows,  all rows are materialized by calling absolute(-1). After
> this the cursor is positioned before the first row by calling
> beforeFirst().  Printing the locktable shows
> 1)a IX lock on the table,  which is fine.
> 2)U row lock on the table. Why do we hold the U lock when the cursor is
> not positioned on any row ?.

Thanks for testing SUR. This is not as it was intendended to be, and I
have already filed a bug report:

DERBY-1696 "transaction may sometimes keep lock on a row after moving
off the resultset in scrollable updatable resultset"

Hopefully it can be fixed for 10.2


View raw message