module-puppetlabs-mysql/tests/mysql_database.pp
Matthew Monaco d986a87558 mysql_database: prevent syntax error with collate=>'binary'
On MySQL v5.5.38, creating a database such as:

	CREATE DATABASE `mydb` CHARACTER SET binary COLLATE binary;

seems to hit a parser bug. A workaround is simply to quote COLLATE
`binary`. As the quoting is harmless, and for aesthetics, quote both
the CHARACTER SET and COLLATE arguments.
2014-09-15 23:22:59 -06:00

17 lines
352 B
Puppet

class { 'mysql::server':
config_hash => {'root_password' => 'password'}
}
database{ ['test1', 'test2', 'test3']:
ensure => present,
charset => 'utf8',
require => Class['mysql::server'],
}
database{ 'test4':
ensure => present,
charset => 'latin1',
}
database{ 'test5':
ensure => present,
charset => 'binary',
collate => 'binary',
}