diff --git a/lib/core/dump.py b/lib/core/dump.py index 80f4b2f97..8df219872 100644 --- a/lib/core/dump.py +++ b/lib/core/dump.py @@ -219,7 +219,7 @@ class Dump(object): for db, tables in dbTables.items(): tables.sort() - self._write("Database: %s" % db if db else "Current database") + self._write("Database: %s" % unsafeSQLIdentificatorNaming(db) if db else "Current database") if len(tables) == 1: self._write("[1 table]") @@ -273,7 +273,7 @@ class Dump(object): maxlength2 = max(maxlength2, len("TYPE")) lines2 = "-" * (maxlength2 + 2) - self._write("Database: %s\nTable: %s" % (db if db else "Current database", table)) + self._write("Database: %s\nTable: %s" % (unsafeSQLIdentificatorNaming(db) if db else "Current database", unsafeSQLIdentificatorNaming(table))) if len(columns) == 1: self._write("[1 column]") @@ -327,7 +327,7 @@ class Dump(object): maxlength1 = max(maxlength1, len(normalizeUnicode(table) or str(table))) for db, counts in dbTables.items(): - self._write("Database: %s" % db if db else "Current database") + self._write("Database: %s" % unsafeSQLIdentificatorNaming(db) if db else "Current database") lines1 = "-" * (maxlength1 + 2) blank1 = " " * (maxlength1 - len("Table")) @@ -400,7 +400,7 @@ class Dump(object): separator += "+%s" % lines separator += "+" - self._write("Database: %s\nTable: %s" % (db if db else "Current database", table)) + self._write("Database: %s\nTable: %s" % (unsafeSQLIdentificatorNaming(db) if db else "Current database", unsafeSQLIdentificatorNaming(table))) if conf.dumpFormat == DUMP_FORMAT.SQLITE: cols = []