ansible/ansible — pull request #3951 by johnhamelink (2013-08-26 16:27:13+00:00)
Title: Fixed #3767 - mysql_user command fails with dots (and underscores) in database names.

Please excuse my code if it's not up to scratch - I'm not a very experienced python developer!

The problem that was causing #3767 was that the database names weren't being escaped properly. The solution is to further unserialize the privs argument for mysql_user, then surround all non-wildcard content with backticks.

The other thing causing #3767 was that the privileges_get() method was for some reason specifically removing all backticks. I can't think of a reason why this would ever be needed/useful? Removing that piece of code allowed the backticks to remain consistent throughout the script's execution.