[ 
https://issues.apache.org/jira/browse/OPENJPA-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487098
 ] 

Michael Dick commented on OPENJPA-182:
--------------------------------------

I have no practical experience with Sybase, but I did find this in their 
TransactSQL user's guide :

"Changing the isolation level for a query

You can change the isolation level for a query by using the at isolation clause 
with the select or readtext statements. The at isolation clause supports 
isolation levels 0, 1, and 3. It does not support isolation level 2. The read 
uncommitted, read committed, and serializable options of at isolation represent 
isolation levels as listed below:

at isolation option     Isolation level
read uncommited      0
read committed         1
serializable                3

For example, the following two statements query the same table at isolation 
levels 0 and 3, respectively:

select *
from titles
at isolation read uncommitted

select *
from titles
at isolation serializable"

There's more information online here: 
http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@Generic__BookTextView/53911;hf=0



> db2 update lock syntax  WITH <isolation> USE AND KEEP UPDATE LOCKS
> ------------------------------------------------------------------
>
>                 Key: OPENJPA-182
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-182
>             Project: OpenJPA
>          Issue Type: New Feature
>          Components: jdbc
>         Environment: db2 database driver for zOS, AS400, Unix, Windows, Linux
>            Reporter: David Wisneski
>         Assigned To: David Wisneski
>         Attachments: OPENJPA-182.patch, openJPA182.patch
>
>
> A while back we changed the syntax of update locking from FOR UPDATE OF  to  
> WITH RS USE AND KEEP UPDATE LOCKS.   Additional changes are required because 
> 1.  if isolation=serializable is configured, then the syntax should be  WITH 
> RR USE AND KEEP UDPATE LOCKS
> 2.  when using DB2/400 on iSeries machines, the syntax is WITH RS USE AND 
> KEEP EXCLUSIVE LOCKS  or WITH RR USE AND KEEP EXCLUSIVE LOCKS because DB2/400 
> only supports read or exclusive locks. 
> 3.  DB2 supports both a FETCH FIRST  ROWS and update LOCKS clauses.
> So we change supportsLockingWithSelectRange = true in the 
> AbstractDB2Dictionary class and change the DB2Dictionary to append the 
> correct LOCKS syntax depending on vendor, release and isolation level.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to