Minor bug fix (for --first/--last through problematic DBMSes)

This commit is contained in:
Miroslav Stampar 2013-02-05 15:03:55 +01:00
parent 31daefc7c9
commit 01219219fc

View File

@ -496,7 +496,6 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
dataToStdout(filterControlChars(commonValue[index - 1:])) dataToStdout(filterControlChars(commonValue[index - 1:]))
finalValue = commonValue finalValue = commonValue
break break
# If there is a common pattern starting with partialValue, # If there is a common pattern starting with partialValue,
@ -549,7 +548,9 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
break break
if (lastChar > 0 and index >= lastChar): if (lastChar > 0 and index >= lastChar):
finalValue = partialValue finalValue = "" if length == 0 else partialValue
finalValue = finalValue.rstrip() if len(finalValue) > 1 else finalValue
partialValue = None
break break
except KeyboardInterrupt: except KeyboardInterrupt: