[jOOQ/jOOQ#9177] Correct implementation of LIMIT PERCENT in OSS edition
This commit is contained in:
parent
4eec820189
commit
2aedc1ec27
@ -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;
|
||||
|
||||
@ -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());
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user