Skip to content

Commit

Permalink
Default to utf8 for MySQL
Browse files Browse the repository at this point in the history
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 7dfb878)
  • Loading branch information
rickerc authored and claytono committed May 27, 2014
1 parent 3f0fb20 commit 1da5943
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions manifests/db/mysql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions spec/classes/nova_db_mysql_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]) }
Expand All @@ -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]) }
Expand Down

0 comments on commit 1da5943

Please sign in to comment.