#1127 - Remove the ebean.query.globallimit of 1 million "backstop"

This commit is contained in:
rob bygrave
2017-09-13 21:22:03 +12:00
parent 1e6678cbb4
commit c7a7651602
@@ -54,8 +54,6 @@ public class CQuery<T> implements DbReadContext, CancelableQuery {
private static final Logger logger = LoggerFactory.getLogger(CQuery.class);
private static final int GLOBAL_ROW_LIMIT = Integer.valueOf(System.getProperty("ebean.query.globallimit", "1000000"));
/**
* The resultSet rows read.
*/
@@ -149,8 +147,6 @@ public class CQuery<T> implements DbReadContext, CancelableQuery {
*/
private final BeanPropertyAssocMany<?> manyProperty;
private final int maxRowsLimit;
private DataReader dataReader;
/**
@@ -221,7 +217,6 @@ public class CQuery<T> implements DbReadContext, CancelableQuery {
this.logWhereSql = queryPlan.getLogWhereSql();
this.desc = request.getBeanDescriptor();
this.predicates = predicates;
this.maxRowsLimit = query.getMaxRows() > 0 ? query.getMaxRows() : GLOBAL_ROW_LIMIT;
this.help = createHelp(request);
this.collection = (help != null ? help.createEmptyNoParent() : null);
}
@@ -520,7 +515,7 @@ public class CQuery<T> implements DbReadContext, CancelableQuery {
protected boolean hasNext() throws SQLException {
synchronized (this) {
if (noMoreRows || cancelled || loadedBeanCount >= maxRowsLimit) {
if (noMoreRows || cancelled) {
return false;
}
if (hasNextCache) {