module-puppetlabs-mysql/lib/puppet/type
Lars Kellogg-Stedman 0afb8f09e8 lowercase hostname values in qualified usernames
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.
2014-06-04 09:30:45 -04:00
..
database.rb Refactor and rename database_grant to mysql_grant. 2013-09-03 17:24:21 -04:00
database_grant.rb Refactor and rename database_grant to mysql_grant. 2013-09-03 17:24:21 -04:00
database_user.rb lowercase hostname values in qualified usernames 2014-06-04 09:30:45 -04:00
mysql_database.rb Rename and refactor database to mysql_database. 2013-08-28 18:11:21 -04:00
mysql_grant.rb mysql_grant bugfix: remove duplicate privileges and GRANT privilege, otherwise the resource gets changed every puppet run 2013-12-11 13:17:52 +01:00
mysql_user.rb lowercase hostname values in qualified usernames 2014-06-04 09:30:45 -04:00