MySQL: change default MySQL collate to utf8_general_ci

Install & configure MySQL database by using utf8_general_ci collation
which is the way documented in OpenStack [1] and already the default
in puppetlabs-mysql [2].

[1] http://goo.gl/GA5gyZ
[2] https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/db.pp#L7

Change-Id: Ia4a2a1340630689ee838849ab5695f72edbb7b8a
Closes-bug: #1446375
This commit is contained in:
Emilien Macchi
2015-04-21 13:12:13 -04:00
parent 7f40c612d2
commit 2d2e86aebd
2 changed files with 6 additions and 4 deletions

View File

@@ -25,7 +25,7 @@
#
# [*collate*]
# (optional) The collate to use for the nova database
# Defaults to 'utf8_unicode_ci'
# Defaults to 'utf8_general_ci'
#
# [*allowed_hosts*]
# (optional) Additional hosts that are allowed to access this DB
@@ -44,7 +44,7 @@ class nova::db::mysql(
$user = 'nova',
$host = '127.0.0.1',
$charset = 'utf8',
$collate = 'utf8_unicode_ci',
$collate = 'utf8_general_ci',
$allowed_hosts = undef,
$mysql_module = undef,
) {

View File

@@ -23,7 +23,8 @@ describe 'nova::db::mysql' do
it { is_expected.to contain_openstacklib__db__mysql('nova').with(
:user => 'nova',
:password_hash => '*AA1420F182E88B9E5F874F6FBE7459291E8F4601',
:charset => 'utf8'
:charset => 'utf8',
:collate => 'utf8_general_ci',
)}
end
@@ -49,7 +50,8 @@ describe 'nova::db::mysql' do
it { is_expected.to contain_openstacklib__db__mysql('nova').with(
:user => 'nova',
:password_hash => '*AA1420F182E88B9E5F874F6FBE7459291E8F4601',
:charset => 'utf8'
:charset => 'utf8',
:collate => 'utf8_general_ci',
)}
end