Skip to content

Commit 14219a3

Browse files
committed
Minor bug fix
1 parent 6012ab1 commit 14219a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/core/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def nullCastConcatFields(self, fields):
329329
if not Backend.getDbms():
330330
return fields
331331

332-
if fields.startswith("(CASE") or fields.startswith("SUBSTR"):
332+
if fields.startswith("(CASE") or fields.startswith("SUBSTR") or fields.startswith("MID("):
333333
nulledCastedConcatFields = fields
334334
else:
335335
fields = fields.replace(", ", ",")
@@ -369,7 +369,7 @@ def getFields(self, query):
369369
fieldsSelectFrom = getCompiledRegex("\ASELECT%s\s+(.+?)\s+FROM\s+" % prefixRegex, re.I).search(query)
370370
fieldsExists = getCompiledRegex("EXISTS(.*)", re.I).search(query)
371371
fieldsSelect = getCompiledRegex("\ASELECT%s\s+(.*)" % prefixRegex, re.I).search(query)
372-
fieldsSubstr = getCompiledRegex("\ASUBSTR", re.I).search(query)
372+
fieldsSubstr = getCompiledRegex("\A(SUBSTR|MID\()", re.I).search(query)
373373
fieldsNoSelect = query
374374

375375
if fieldsSubstr:

0 commit comments

Comments
 (0)