mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Merge pull request #51747 from ymasson/fix_mysql_grants
Fix escaping for special charaters
This commit is contained in:
commit
e75fc1c603
@ -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('%', '%%') + '`'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user