From 1da5943aaa019b16a913a7f2d81e6e547d4d8d94 Mon Sep 17 00:00:00 2001 From: Chris Ricker Date: Fri, 23 May 2014 15:05:02 -0400 Subject: [PATCH] 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 (cherry picked from commit 7dfb878bc2e9668cb99962238894e82f566680c9) --- manifests/db/mysql.pp | 8 ++++---- spec/classes/nova_db_mysql_spec.rb | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/manifests/db/mysql.pp b/manifests/db/mysql.pp index f883283b4..1b72dc6e8 100644 --- a/manifests/db/mysql.pp +++ b/manifests/db/mysql.pp @@ -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 @@ $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 diff --git a/spec/classes/nova_db_mysql_spec.rb b/spec/classes/nova_db_mysql_spec.rb index 3eb6ff2c2..06494c289 100644 --- a/spec/classes/nova_db_mysql_spec.rb +++ b/spec/classes/nova_db_mysql_spec.rb @@ -23,14 +23,14 @@ 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 @@ 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]) }