openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter" <kwsut...@gmail.com>
Subject Re: DB2 and "FOR UPDATE OF" clause
Date Fri, 07 Sep 2007 20:27:32 GMT
Catalina,

On 9/6/07, Patrick Linskey <plinskey@gmail.com> wrote:
>
>
> FWIW, I was also seeing an exception complaining about the 'FOR UPDATE
> OF' clause. I was surprised by the syntax, as I would have expected it
> to say 'FOR UPDATE OF <something>'.


I agree with Patrick on  this question.  According to the db2 manual, the
"FOR UPDATE OF" clause is supposed to be followed by a list of column(s).
Otherwise, the clause should just be "FOR UPDATE".  I looked at the sql
generation code and I didn't see where we are supplying any column
identifiers.  Am I missing something?

For reference:
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/topic/com.ibm.db29.doc.sqlref/xf6a19.htm#xf6a19

Thanks,
Kevin

-Patrick
>
> On 9/6/07, catalina wei <catalina.wei@gmail.com> wrote:
> > Hi Patrick,
> > That SQL is correct syntax if you are running DB2 UDB version 8.1 or
> earlier
> > and the isolation level is set pessimistic.
> >
> > If you are not running the said DB2 version and still seeing "FOR UPDATE
> OF"
> > string, then we have a problem in DB2Dictionary.
> >
> > Catalina
> >
> >
> > On 9/6/07, Patrick Linskey <plinskey@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > I'm seeing SQL like so:
> > >
> > > SELECT  t0.ID, t0.VERSN, t0.STRINGFIELD FROM SIMPLEPERSISTENTCLASS t0
> > > FOR UPDATE OF
> > >
> > > Is this valid DB2 SQL? I'm using a DB2 database that returns SQL08016
> > > from a call to getDatabaseProductVersion(). I'm guessing that the
> > > checks for the FOR UPDATE clauses are getting tripped up somewhere.
> > > Any suggestions about what it should be for this version of DB2?
> > >
> > > -Patrick
> > >
> > > --
> > > Patrick Linskey
> > > 202 669 5907
> > >
> >
>
>
> --
> Patrick Linskey
> 202 669 5907
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message