Default to utf8 for MySQL

Change default charset to utf8 and default collation order to
utf8_unicode_ci to align with upstream defaults.

Change-Id: I2aa59fd868476f599019e3029af36aa707139fe1
Closes-Bug: #1302088
This commit is contained in:
Chris Ricker
2014-05-23 15:05:02 -04:00
parent f221cbc52a
commit 7dfb878bc2
2 changed files with 8 additions and 8 deletions

View File

@@ -21,11 +21,11 @@
#
# [*charset*]
# (optional) The charset to use for the nova database
# Defaults to 'latin1'
# Defaults to 'utf8'
#
# [*collate*]
# (optional) The collate to use for the nova database
# Defaults to 'latin1_swedish_ci'
# Defaults to 'utf8_unicode_ci'
#
# [*allowed_hosts*]
# (optional) Additional hosts that are allowed to access this DB
@@ -45,8 +45,8 @@ class nova::db::mysql(
$dbname = 'nova',
$user = 'nova',
$host = '127.0.0.1',
$charset = 'latin1',
$collate = 'latin1_swedish_ci',
$charset = 'utf8',
$collate = 'utf8_unicode_ci',
$allowed_hosts = undef,
$mysql_module = '0.9',
$cluster_id = undef

View File

@@ -23,14 +23,14 @@ describe 'nova::db::mysql' do
it { should contain_mysql__db('nova').with(
:user => 'nova',
:password => 'qwerty',
:charset => 'latin1',
:charset => 'utf8',
:require => "Class[Mysql::Config]"
)}
end
context 'when overriding charset' do
let :params do
{ :charset => 'utf8' }.merge(required_params)
{ :charset => 'latin1' }.merge(required_params)
end
it { should contain_mysql__db('nova').with_charset(params[:charset]) }
@@ -50,14 +50,14 @@ describe 'nova::db::mysql' do
it { should contain_mysql__db('nova').with(
:user => 'nova',
:password => 'qwerty',
:charset => 'latin1',
:charset => 'utf8',
:require => "Class[Mysql::Config]"
)}
end
context 'when overriding charset' do
let :params do
{ :charset => 'utf8' }.merge(required_params)
{ :charset => 'latin1' }.merge(required_params)
end
it { should contain_mysql__db('nova').with_charset(params[:charset]) }