Minor fix to avoid query splitting/unpacking when the statement is EXISTS()

This commit is contained in:
Bernardo Damele committed 2011-01-13 10:00:40 +00:00
1 parent be6e2d6a31
commit ca33728fbc
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -533,7 +533,7 @@ class Agent:
inbandQuery += ", "
if element == position:
if " FROM " in query and not query.startswith("SELECT ") and "(CASE WHEN (" not in query:
if " FROM " in query and "EXISTS(" not in query and not query.startswith("SELECT ") and "(CASE WHEN (" not in query:
conditionIndex = query.index(" FROM ")
inbandQuery += query[:conditionIndex]
else:
@@ -541,7 +541,7 @@ class Agent:
else:
inbandQuery += char
if " FROM " in query and not query.startswith("SELECT ") and "(CASE WHEN (" not in query:
if " FROM " in query and "EXISTS(" not in query and not query.startswith("SELECT ") and "(CASE WHEN (" not in query:
conditionIndex = query.index(" FROM ")
inbandQuery += query[conditionIndex:]