@@ -348,7 +348,7 @@ def unionUse(expression, unpack=True, dump=False):
348348 debugMsg += "it does not play well with UNION query SQL injection"
349349 singleTimeDebugMessage (debugMsg )
350350
351- if Backend .getIdentifiedDbms () in (DBMS .MYSQL , DBMS .ORACLE , DBMS .PGSQL , DBMS .MSSQL , DBMS .SQLITE , DBMS .H2 , DBMS .HSQLDB , DBMS .FIREBIRD ) and expressionFields and not any ((conf .binaryFields , conf .limitStart , conf .limitStop , conf .forcePartial , conf . disableJson )):
351+ if Backend .getIdentifiedDbms () in (DBMS .MYSQL , DBMS .ORACLE , DBMS .PGSQL , DBMS .MSSQL , DBMS .SQLITE , DBMS .H2 , DBMS .HSQLDB , DBMS .FIREBIRD ) and expressionFields and not any ((conf .binaryFields , conf .limitStart , conf .limitStop , conf .disableJson )):
352352 match = re .search (r"SELECT\s*(.+?)\bFROM" , expression , re .I )
353353 if match and not (Backend .isDbms (DBMS .ORACLE ) and FROM_DUMMY_TABLE [DBMS .ORACLE ] in expression ) and not re .search (r"\b(MIN|MAX|COUNT|EXISTS)\(" , expression ):
354354 kb .jsonAggMode = True
@@ -374,7 +374,7 @@ def unionUse(expression, unpack=True, dump=False):
374374 # response cap) and the table is large, retrieve the rows in bounded windows (chunked
375375 # JSON aggregation) before the slow per-row fallback. Done here (independent of the
376376 # detected UNION where-clause) so it engages for any dumpable FROM-table query.
377- if value is None and " FROM " in expression .upper () and not re .search (SQL_SCALAR_REGEX , expression , re .I ) and not any ((kb . forcePartialUnion , conf . forcePartial , conf .disableJson , conf .binaryFields , conf .limitStart , conf .limitStop )):
377+ if value is None and " FROM " in expression .upper () and not re .search (SQL_SCALAR_REGEX , expression , re .I ) and not any ((conf .disableJson , conf .binaryFields , conf .limitStart , conf .limitStop )):
378378 chunkCountExpr = expression .replace (expressionFields , queries [Backend .getIdentifiedDbms ()].count .query % '*' , 1 )
379379 if " ORDER BY " in chunkCountExpr .upper ():
380380 chunkCountExpr = chunkCountExpr [:chunkCountExpr .upper ().rindex (" ORDER BY " )]
0 commit comments