-
Notifications
You must be signed in to change notification settings - Fork 794
lowercase hostname values in qualified usernames #505
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
Conversation
Hi @larsks, thank you very much for this patch! Please note that Could you please add unit tests as well as acceptance tests |
The unit tests in the above commit work for sure. I haven't actually run the acceptance tests locally. |
class { 'mysql::server': } | ||
EOS | ||
EOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happened here with the spacing?
It was apparently attacked by vim's Ruby formatter. |
ACK. more spacing issues in spec/acceptance/types/mysql_user_spec.rb - we use 2 spaces in .rb, too |
actually, all ruby files (your commits touch) are now reformatted to 4 spaces |
MySQL/MariaDB automatically downcase hostnames: MariaDB [mysql]> create user 'testuser'@'HOSTNAME'; MariaDB [mysql]> select user,host from user where host = 'hostname'; +----------+----------+ | user | host | +----------+----------+ | testuser | hostname | +----------+----------+ This causes problems when a mysql_user or datbase_user has an hostname with non-lowercase characters: database_user { "root@HOSTNAME": ensure => absent, } The SELECT statements used to determine if the user exists will fail because the comparisons use "HOSTNAME" but the database has "hostname". This patch forces the hostname part of "user@hostname" to lower case in the custom type definitions.
Should be all set. |
Except for travis which is dead. Everything is yellow forever. I hope we didn't kill it. |
lowercase hostname values in qualified usernames
MySQL/MariaDB automatically downcase hostnames:
This causes problems when a mysql_user or datbase_user has an hostname
with non-lowercase characters:
The SELECT statements used to determine if the user exists will fail
because the comparisons use "HOSTNAME" but the database has "hostname".
This patch forces the hostname part of "user@hostname" to lower case in
the custom type definitions.