Re: JDBC thin driver truncates "FOR UPDATE"??

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 28 Oct 1999 10:17:39 -0400
Message-ID: <1VoYOC4xc2s=TrFpPrz+UivkGNu0_at_4ax.com>


A copy of this was sent to Anders Olsson <Anders.Olsson_at_epk.ericsson.se> (if that email address didn't require changing) On 28 Oct 1999 16:05:14 +0200, you wrote:

>Hi all,
>
>Since there seems to be more traffic in this group, I'm reposting a question
>here.
>
>I've been experiencing strange behaviour in Oracle's JDBC Thin driver
>(816classes12.zip).
>I did a 'select * from foo where abc = xyz FOR UPDATE', but the last statement
>(which ought to make sure I was alone on that particular row, for the duration
> of the current transaction) does not appear to take the write-lock.
>I.e. another client (actually a thread in the same process, but using a
>different connection) can issue the same statement and read the data on the row.
>For transactional integrity (each row can only be used once), I do not want
>this to happen, so I've been forced to explicitly issue a 'dummy update'
>at the beginning of each transaction (update foo set bar = bar where abc = xyz).
>I would rather like to avoid this 'dummy update' (for performance reasons, if
>nothing else).
>
>Has anyone seen anything similar? How does one file a bug with the JDBC driver?
>(Apart from contacting Oracle support, which I already have done)
>Best wishes,
>/Anders

beware -- jdbc auto commits by default. have you:

    connection.setAutoCommit(false);

?

-- 
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
 
Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Thu Oct 28 1999 - 16:17:39 CEST

Original text of this message