Update for Issue #138

This commit is contained in:
Miroslav Stampar 2012-08-08 19:06:47 +02:00
parent 5fc1e8bc12
commit b78163f99b

View File

@ -260,8 +260,8 @@ class Databases:
infoMsg = "skipping system database%s '%s'" % ("s" if len(self.excludeDbsList) > 1 else "", ", ".join(db for db in self.excludeDbsList)) infoMsg = "skipping system database%s '%s'" % ("s" if len(self.excludeDbsList) > 1 else "", ", ".join(db for db in self.excludeDbsList))
logger.info(infoMsg) logger.info(infoMsg)
elif not Backend.isDbms(DBMS.SQLITE): elif not Backend.isDbms(DBMS.SQLITE):
query += " WHERE " query += " WHERE %s" % condition
query += " OR ".join("%s = '%s'" % (condition, unsafeSQLIdentificatorNaming(db)) for db in sorted(dbs)) query += " IN (%s)" % ",".join("'%s'" % unsafeSQLIdentificatorNaming(db) for db in sorted(dbs))
if len(dbs) < 2 and ("%s," % condition) in query: if len(dbs) < 2 and ("%s," % condition) in query:
query = query.replace("%s," % condition, "", 1) query = query.replace("%s," % condition, "", 1)