fix detect bug

This commit is contained in:
jjf012 2015-11-26 11:31:53 +08:00
parent c7ec1534a6
commit 54594e5e1b

View File

@ -74,7 +74,7 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
testChar = str(current % 10)
testQuery = "SELECT %s('%s',%d)" % ("REPEAT" if Backend.isDbms(DBMS.MYSQL) else "REPLICATE", testChar, current)
result = unArrayizeValue(_oneShotErrorUse(testQuery, chunkTest=True))
if result and testChar in result:
if result and (len(result.replace(testChar,''))==0):
if result == testChar * current:
kb.errorChunkLength = current
break