Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 906cb6d

Browse files
committed
Removing a hard limit to use --start/--stop only for --dump scenarios
1 parent ac467bc commit 906cb6d

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

lib/core/common.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ def expandAsteriskForColumns(expression):
13701370

13711371
return expression
13721372

1373-
def getLimitRange(count, dump=False, plusOne=False):
1373+
def getLimitRange(count, plusOne=False):
13741374
"""
13751375
Returns range of values used in limit/offset constructs
13761376
@@ -1382,12 +1382,11 @@ def getLimitRange(count, dump=False, plusOne=False):
13821382
count = int(count)
13831383
limitStart, limitStop = 1, count
13841384

1385-
if dump:
1386-
if isinstance(conf.limitStop, int) and conf.limitStop > 0 and conf.limitStop < limitStop:
1387-
limitStop = conf.limitStop
1385+
if isinstance(conf.limitStop, int) and conf.limitStop > 0 and conf.limitStop < limitStop:
1386+
limitStop = conf.limitStop
13881387

1389-
if isinstance(conf.limitStart, int) and conf.limitStart > 0 and conf.limitStart <= limitStop:
1390-
limitStart = conf.limitStart
1388+
if isinstance(conf.limitStart, int) and conf.limitStart > 0 and conf.limitStart <= limitStop:
1389+
limitStart = conf.limitStart
13911390

13921391
retVal = xrange(limitStart, limitStop + 1) if plusOne else xrange(limitStart - 1, limitStop)
13931392

plugins/generic/entries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def dumpTable(self, foundData=None):
275275
else:
276276
emptyColumns = []
277277
plusOne = Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2)
278-
indexRange = getLimitRange(count, dump=True, plusOne=plusOne)
278+
indexRange = getLimitRange(count, plusOne=plusOne)
279279

280280
if len(colList) < len(indexRange) > CHECK_ZERO_COLUMNS_THRESHOLD:
281281
for column in colList:

0 commit comments

Comments
 (0)