Skip to content

Commit

Permalink
Fix Oracle 11 issues with aliases and disable FollowOnLockingTest on …
Browse files Browse the repository at this point in the history
…that version
  • Loading branch information
beikov committed Oct 13, 2023
1 parent 12442bd commit 70bd1e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4440,6 +4440,16 @@ protected void emulateFetchOffsetWithWindowFunctions(
&& !( getCurrentQueryPart() instanceof QueryGroup ) ) {
appendSql( '*' );
}
else if ( columnAliases != null ) {
String separator = "";
for ( String columnAlias : columnAliases ) {
appendSql( separator );
appendSql( alias );
appendSql( '.' );
appendSql( columnAlias );
separator = COMA_SEPARATOR;
}
}
else {
int size = 0;
for ( SqlSelection sqlSelection : queryPart.getFirstQuerySpec().getSelectClause().getSqlSelections() ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import org.hibernate.dialect.CockroachDialect;
import org.hibernate.dialect.HSQLDialect;
import org.hibernate.dialect.OracleDialect;
import org.hibernate.query.spi.QueryImplementor;

import org.hibernate.testing.jdbc.SQLStatementInspector;
Expand Down Expand Up @@ -39,6 +40,7 @@
@SessionFactory(useCollectingStatementInspector = true)
@SkipForDialect(dialectClass = HSQLDialect.class, reason = "Seems HSQLDB doesn't cancel the query if it waits for a lock?!")
@SkipForDialect(dialectClass = CockroachDialect.class, reason = "Cockroach allows the concurrent access but cancels one or both transactions at the end")
@SkipForDialect(dialectClass = OracleDialect.class, majorVersion = 11, reason = "Timeouts don't work on Oracle 11 when using a driver other than ojdbc6, but we can't test with that driver")
public class FollowOnLockingTest {

@Test
Expand Down

0 comments on commit 70bd1e4

Please sign in to comment.