Skip to content
Browse files

Merge pull request #1062 from fatbox/mysql-grant-1060

Escape table name, only when it's not * [GH-1060]
  • Loading branch information...
2 parents 6ae1bb8 + 4292d0c commit e8cd3c8ecfadeaa6f01c04889e5989a6afbf6f8f @thatch45 thatch45 committed Apr 8, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 salt/modules/mysql.py
View
2 salt/modules/mysql.py
@@ -539,6 +539,8 @@ def __grant_generate(grant,
if escape:
db = "`%s`" % db
+ if table is not '*':
+ table = "`%s`" % table
query = "GRANT %s ON %s.%s TO '%s'@'%s'" % (grant, db, table, user, host,)
if grant_option:
query += " WITH GRANT OPTION"

0 comments on commit e8cd3c8

Please sign in to comment.
Something went wrong with that request. Please try again.