From 6122ac4ebbd38a9f0a99e23929fa7e1e1b702a53 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Tue, 21 Apr 2015 13:13:18 -0400 Subject: [PATCH] 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: I7ceecaa3e7fe964e53714cfd4c6fd2b8ff90fce0 Closes-bug: #1446375 --- README.md | 2 +- manifests/db/mysql.pp | 4 ++-- spec/defines/openstacklib_db_mysql_spec.rb | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4329cd24..8ea83e26 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ string; optional; default to 'utf8' #####`collate` The collate to use for the database; -string; optional; default to 'utf8_unicode_ci' +string; optional; default to 'utf8_general_ci' #####`allowed_hosts` Additional hosts that are allowed to access this database; diff --git a/manifests/db/mysql.pp b/manifests/db/mysql.pp index 2f01625c..7cf10102 100644 --- a/manifests/db/mysql.pp +++ b/manifests/db/mysql.pp @@ -26,7 +26,7 @@ # # [*collate*] # The collate to use for the database; -# string; optional; default to 'utf8_unicode_ci' +# string; optional; default to 'utf8_general_ci' # # [*allowed_hosts*] # Additional hosts that are allowed to access this database; @@ -42,7 +42,7 @@ define openstacklib::db::mysql ( $user = $title, $host = '127.0.0.1', $charset = 'utf8', - $collate = 'utf8_unicode_ci', + $collate = 'utf8_general_ci', $allowed_hosts = [], $privileges = 'ALL', ) { diff --git a/spec/defines/openstacklib_db_mysql_spec.rb b/spec/defines/openstacklib_db_mysql_spec.rb index 1656e86c..ca6884a3 100644 --- a/spec/defines/openstacklib_db_mysql_spec.rb +++ b/spec/defines/openstacklib_db_mysql_spec.rb @@ -21,7 +21,7 @@ describe 'openstacklib::db::mysql' do it { is_expected.to contain_mysql_database(title).with( :charset => 'utf8', - :collate => 'utf8_unicode_ci' + :collate => 'utf8_general_ci' )} it { is_expected.to contain_openstacklib__db__mysql__host_access("#{title}_127.0.0.1").with( :user => title, @@ -37,7 +37,7 @@ describe 'openstacklib::db::mysql' do it { is_expected.to contain_mysql_database(params[:dbname]).with( :charset => 'utf8', - :collate => 'utf8_unicode_ci' + :collate => 'utf8_general_ci' )} it { is_expected.to contain_openstacklib__db__mysql__host_access("#{params[:dbname]}_127.0.0.1").with( :user => title, @@ -53,12 +53,12 @@ describe 'openstacklib::db::mysql' do it { is_expected.to contain_mysql_database(title).with( :charset => 'utf8', - :collate => 'utf8_unicode_ci' + :collate => 'utf8_general_ci' )} it { is_expected.to contain_openstacklib__db__mysql__host_access("#{title}_127.0.0.1").with( :user => params[:user], :database => title, - :privileges => 'ALL' + :privileges => 'ALL', )} end