Patch for an Issue #798

This commit is contained in:
Miroslav Stampar 2014-08-26 23:11:44 +02:00
parent e68326c0fe
commit 2a268199d4

View File

@ -1268,7 +1268,14 @@ def expandAsteriskForColumns(expression):
logger.info(infoMsg)
_ = asterisk.group(2).replace("..", ".").replace(".dbo.", ".")
conf.db, conf.tbl = _.split(".", 1) if '.' in _ else (None, _)
db, conf.tbl = _.split(".", 1) if '.' in _ else (None, _)
if db is None:
if expression != conf.query:
conf.db = db
else:
expression = re.sub(r"([^\w])%s" % conf.tbl, "\g<1>%s.%s" % (conf.db, conf.tbl), expression)
else:
conf.db = db
conf.db = safeSQLIdentificatorNaming(conf.db)
conf.tbl = safeSQLIdentificatorNaming(conf.tbl, True)