mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Fixing keyset dump for some cases
This commit is contained in:
parent
18e06c6381
commit
154adb1d4d
2 changed files with 10 additions and 3 deletions
|
|
@ -246,8 +246,15 @@ def _dumpComposite(tbl, colList, count, cursorCols, tableRef, entries, lengths):
|
|||
if prev is None:
|
||||
condition = "1=1"
|
||||
else:
|
||||
# ANSI row-value (tuple) comparison advances the composite cursor lexicographically
|
||||
condition = "(%s)>(%s)" % (orderExpr, ','.join(_lit(_) for _ in prev))
|
||||
# Portable lexicographic seek predicate. ANSI row-value comparison ((a,b)>(x,y)) is not
|
||||
# supported on MSSQL/Oracle - there it errored, stopping the walk after the first row -
|
||||
# so expand it to (a>x) OR (a=x AND b>y) OR ... which uses only scalar comparisons.
|
||||
ors = []
|
||||
for i in xrange(len(fields)):
|
||||
terms = ["%s=%s" % (fields[j], _lit(prev[j])) for j in xrange(i)]
|
||||
terms.append("%s>%s" % (fields[i], _lit(prev[i])))
|
||||
ors.append("(%s)" % " AND ".join(terms))
|
||||
condition = "(%s)" % " OR ".join(ors)
|
||||
|
||||
tup = []
|
||||
for field in fields:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue