Merge pull request #51747 from ymasson/fix_mysql_grants

Fix escaping for special charaters
This commit is contained in:
Daniel Wozniak 2019-02-22 11:20:17 -07:00 committed by GitHub
commit e75fc1c603
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -584,7 +584,7 @@ def quote_identifier(identifier, for_grants=False):
'''
if for_grants:
return '`' + identifier.replace('`', '``').replace('_', r'\_') \
.replace('%', r'\%%') + '`'
.replace('%', r'%%') + '`'
else:
return '`' + identifier.replace('`', '``').replace('%', '%%') + '`'