db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Bradbury <Stan.Bradb...@gmail.com>
Subject Re: Row level locking
Date Fri, 18 May 2007 00:33:53 GMT
Umakanth Srinivasan wrote:
> Mode: Embeded 
> I was trying to generate sequence keys with my code, and I faced issue in
> row level locking
>
> First,
> I locked my sequence keys holding table ( a table which says what is the
> next key for a specific table), with the "FOR UPDATE OF <column name>"
> keyword. 
>
> Second,
> Then updating the table by incrementing the existing value, and getting the
> updated value.
>
> With print traces in my code I found that when a select query locks a
> particular row, and then before the next update, another connection is
> allowed to make a select on the query and get the same value.
>
> Am I missing anything here.
>
>
>   
Are you turning off autocommit before performing SELECT ... FOR UPDATE 
OF ...  ?


Mime
View raw message