minor fix (database and/or table names with - sign inside needs to be escaped by ` character or will lead to a "SQL syntax")

This commit is contained in:
Miroslav Stampar 2011-01-02 11:01:20 +00:00
parent dce9a762f1
commit 7b9d978cf9

View File

@ -1131,6 +1131,12 @@ class Enumeration:
rootQuery = queries[kb.dbms].dump_table
if kb.dbms == DBMS.MYSQL:
if '-' in conf.tbl:
conf.tbl = "`%s`" % conf.tbl
if '-' in conf.db:
conf.db = "`%s`" % conf.db
if conf.col:
colList = conf.col.split(",")
kb.data.cachedColumns[conf.db] = {}