[jOOQ/jOOQ#9177] Correct implementation of LIMIT PERCENT in OSS edition

This commit is contained in:
Knut Wannheden 2019-09-06 11:28:28 +02:00
parent 4eec820189
commit 2aedc1ec27
2 changed files with 2 additions and 2 deletions

View File

@ -1599,7 +1599,7 @@ abstract class AbstractResultQuery<R extends Record> extends AbstractQuery imple
private final boolean hasLimit1() {
if (this instanceof SelectQueryImpl) {
Limit l = ((SelectQueryImpl) this).getLimit();
return !l.withTies() && l.limitOne();
return !l.withTies() && !l.percent() && l.limitOne();
}
return false;

View File

@ -385,7 +385,7 @@ final class Limit extends AbstractQueryPart {
final boolean limitOne() {
return !limitZero()
&& !withTies()
&& !percent()
&& numberOfRows instanceof Param
&& Long.valueOf(1L).equals(((Param<?>) numberOfRows).getValue());
}