Skip to content

(#3028) Fix mysql_grant with MySQL ANSI_QUOTES mode #796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 5, 2016
Merged

(#3028) Fix mysql_grant with MySQL ANSI_QUOTES mode #796

merged 1 commit into from
Feb 5, 2016

Conversation

jhriggs
Copy link
Contributor

@jhriggs jhriggs commented Feb 3, 2016

Change mysql_grant provider to ignore/delete double-quotes -- as it does with single quotes and backticks -- in the returned list of existing grants. With ANSI_QUOTES enabled in MySQL's sql_mode, grant identifiers (e.g. database name) are quoted with double-quotes rather than backticks, for example "foo".* vs. foo.*. This breaks mysql_grant's evaluation of existing grants and causes it to apply grants with every run.

Change mysql_grant provider to ignore/delete double-quotes -- as it does with single quotes and backticks -- in the returned list of existing grants. With ANSI_QUOTES enabled in MySQL's sql_mode, grant identifiers (e.g. database name) are quoted with double-quotes rather than backticks, for example "foo".* vs. `foo`.*. This breaks mysql_grant's evaluation of existing grants and causes it to apply grants with every run.
@bmjen
Copy link
Contributor

bmjen commented Feb 5, 2016

Thanks for the contribution @jhriggs !

bmjen added a commit that referenced this pull request Feb 5, 2016
…_QUOTES

(#3028) Fix mysql_grant with MySQL ANSI_QUOTES mode
@bmjen bmjen merged commit 6598be8 into puppetlabs:master Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants