preparation for issue #310

This commit is contained in:
Bernardo Damele 2012-12-19 11:40:00 +00:00
parent f5450e9f0e
commit d80744d3d5
2 changed files with 3 additions and 2 deletions

View File

@ -317,7 +317,8 @@ def errorUse(expression, dump=False):
countedExpression = expression.replace(expressionFields, queries[Backend.getIdentifiedDbms()].count.query % ('*' if len(expressionFieldsList) > 1 else expressionFields), 1)
if " ORDER BY " in expression:
countedExpression = countedExpression[:countedExpression.index(" ORDER BY ")]
_ = countedExpression.upper().rindex(" ORDER BY ")
countedExpression = countedExpression[:_]
_, _, _, _, _, _, countedExpressionFields, _ = agent.getFields(countedExpression)
count = _oneShotErrorUse(countedExpression, countedExpressionFields)

View File

@ -263,7 +263,7 @@ def unionUse(expression, unpack=True, dump=False):
stopLimit = 1
elif not count or int(count) == 0:
elif (not count or int(count) == 0):
if not count:
warnMsg = "the SQL query provided does not "
warnMsg += "return any output"