| org.hibernate.test.locking.UpgradeSkipLockedTest.testOracleSkipLocked org.hibernate.test.locking.PessimisticReadSkipLockedTest.testOracleSkipLocked
These tests pass with older versions of Oracle databases, but fail with Oracle12cR2 (I'm not sure about R1). It looks like that Oracle12cR2 doesn't support FOR UPDATE together with FETCH FIRST ....
16:20:04,395 DEBUG SQL:94 -
select
abstractsk0_.id as id1_0_,
abstractsk0_.processed as processed2_0_
from
BatchJob abstractsk0_ fetch first ? rows only for update
skip locked
Hibernate:
select
abstractsk0_.id as id1_0_,
abstractsk0_.processed as processed2_0_
from
BatchJob abstractsk0_ fetch first ? rows only for update
skip locked
16:20:04,409 WARN SqlExceptionHelper:137 - SQL Error: 2014, SQLState: 42000
16:20:04,409 ERROR SqlExceptionHelper:142 - ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc.
Oracle11gR2 (with Oracle10gDialect) uses different query
14:05:20,381 DEBUG SQL:94 -
select
*
from
( select
abstractsk0_.id as id1_0_,
abstractsk0_.processed as processed2_0_
from
BatchJob abstractsk0_ )
where
rownum <= ? for update
skip locked
Hibernate:
select
*
from
( select
abstractsk0_.id as id1_0_,
abstractsk0_.processed as processed2_0_
from
BatchJob abstractsk0_ )
where
rownum <= ? for update
skip locked
Difference with Oracle12cDialect is LimitHandler
@Override
public LimitHandler getLimitHandler() {
return SQL2008StandardLimitHandler.INSTANCE;
}
It's probably only test issue, but I'm not sure. |