puppetlabs/puppetlabs-mysql — pull request #242 by bsavioli (2013-08-13 15:20:42+00:00)
Title: added support to manage grants per table

I need to manage a couple of grants on tables and the module only supports global and database level.

The syntax for the grants per table is:
```ruby
database_grant { "user@hostname/mysql.proc":
privileges => ['select'],
require => Database_user['user@hostname'],
}
```
The privileges format for the tables_priv table is different from the db table. The valid privileges are:
**'Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger'**

It's very likely that this code has bugs, but at least, it seems to work.
I don't know ruby to well, so I hacked my way through this code. It might help someone to make a proper job with it.