example42/puppet-mysql — pull request #25 by javierbertoli (2013-05-27 22:01:15+00:00)
Title: Fixed wildcard database and added some extra options to grant.pp, added tests.

Alessandro,

grant.pp had an error when using '*' as a wildcard. It passed the asterisk literal to the grant command, but in SQL the wildcard is '%', so the grant didn't do what expected. Corrected this.

Also added:

* Extra controls to be able to specify grants for wilcard databases (something like 'datab%').
* Added extra controls when specifying wilcards, so no database creation is attempted in these cases.
* Add extra parameter to be able to specify if you want to create or not the database.
* Added tests.

Please take a look at the changes and let me know if something is wrong

Regards,

Javier