Skip to content

Commit

Permalink
HHH-18309 Fix Oracle limit handler for native queries
Browse files Browse the repository at this point in the history
  • Loading branch information
mbladel committed Aug 7, 2024
1 parent 9ec2dbb commit 4ca26f9
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,17 @@ public class Oracle12LimitHandler extends AbstractLimitHandler {

@Override
public String processSql(String sql, Limit limit, QueryOptions queryOptions) {
final boolean hasFirstRow = hasFirstRow( limit );
final boolean hasMaxRows = hasMaxRows( limit );

if ( !hasFirstRow && !hasMaxRows ) {
return sql;
}

return processSql(
sql,
hasFirstRow( limit ),
hasMaxRows( limit ),
hasFirstRow,
hasMaxRows,
queryOptions.getLockOptions()
);
}
Expand Down

0 comments on commit 4ca26f9

Please sign in to comment.