From b6ccc0cc4345e9ce4b87380ebf764c78185d77a2 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 18 Oct 2011 14:35:42 +0000 Subject: [PATCH] minor update --- plugins/generic/enumeration.py | 6 +++--- xml/queries.xml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index 0946f2a60..7a85608e2 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -1615,12 +1615,12 @@ class Enumeration: entries = zip(*[entries[colName] for colName in colList]) else: query = rootQuery.inband.query % (colString, conf.db, tbl) + elif Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.PGSQL): + query = rootQuery.inband.query % (colString, conf.db, tbl, sorted(colList, key=len)[0]) else: query = rootQuery.inband.query % (colString, conf.db, tbl) if not entries and query: - if Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.PGSQL): - query = "%s ORDER BY %s" % (query, sorted(colList, key=len)[0]) entries = inject.getValue(query, blind=False, dump=True) if isNoneValue(entries): @@ -1730,7 +1730,7 @@ class Enumeration: entries[column] = BigArray() if Backend.getIdentifiedDbms() in ( DBMS.MYSQL, DBMS.PGSQL ): - query = rootQuery.blind.query % (column, conf.db, conf.tbl, index) + query = rootQuery.blind.query % (column, conf.db, conf.tbl, sorted(colList, key=len)[0], index) elif Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2): query = rootQuery.blind.query % (column, column, tbl.upper() if not conf.db else ("%s.%s" % (conf.db.upper(), tbl.upper())), diff --git a/xml/queries.xml b/xml/queries.xml index 9bb5fe1a6..b0bbe7330 100644 --- a/xml/queries.xml +++ b/xml/queries.xml @@ -56,8 +56,8 @@ - - + + @@ -128,8 +128,8 @@ - - + +