diff --git a/lib/core/common.py b/lib/core/common.py index 147705db8..c52441c70 100755 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1370,7 +1370,7 @@ def expandAsteriskForColumns(expression): return expression -def getLimitRange(count, dump=False, plusOne=False): +def getLimitRange(count, plusOne=False): """ Returns range of values used in limit/offset constructs @@ -1382,12 +1382,11 @@ def getLimitRange(count, dump=False, plusOne=False): count = int(count) limitStart, limitStop = 1, count - if dump: - if isinstance(conf.limitStop, int) and conf.limitStop > 0 and conf.limitStop < limitStop: - limitStop = conf.limitStop + if isinstance(conf.limitStop, int) and conf.limitStop > 0 and conf.limitStop < limitStop: + limitStop = conf.limitStop - if isinstance(conf.limitStart, int) and conf.limitStart > 0 and conf.limitStart <= limitStop: - limitStart = conf.limitStart + if isinstance(conf.limitStart, int) and conf.limitStart > 0 and conf.limitStart <= limitStop: + limitStart = conf.limitStart retVal = xrange(limitStart, limitStop + 1) if plusOne else xrange(limitStart - 1, limitStop) diff --git a/plugins/generic/entries.py b/plugins/generic/entries.py index 8a9a05b18..6dc5fe8c4 100644 --- a/plugins/generic/entries.py +++ b/plugins/generic/entries.py @@ -275,7 +275,7 @@ class Entries: else: emptyColumns = [] plusOne = Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2) - indexRange = getLimitRange(count, dump=True, plusOne=plusOne) + indexRange = getLimitRange(count, plusOne=plusOne) if len(colList) < len(indexRange) > CHECK_ZERO_COLUMNS_THRESHOLD: for column in colList: