saltstack/salt — pull request #1019 by fatbox (2012-03-28 20:13:59+00:00)
Title: Only escape the database name, not the table

As per http://dev.mysql.com/doc/refman/5.1/en/grant.html you can only
specify wildcards in the database part of the specification for the
grant.

As it stands right now when the grant is generated it is for a table
with backticks in the name. This leads to the confusing situation where
the user can access the database but cannot access any tables.