Skip to content

Commit 1da5943

Browse files
rickercclaytono
authored andcommitted
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 7dfb878)
1 parent 3f0fb20 commit 1da5943

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

manifests/db/mysql.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
#
2222
# [*charset*]
2323
# (optional) The charset to use for the nova database
24-
# Defaults to 'latin1'
24+
# Defaults to 'utf8'
2525
#
2626
# [*collate*]
2727
# (optional) The collate to use for the nova database
28-
# Defaults to 'latin1_swedish_ci'
28+
# Defaults to 'utf8_unicode_ci'
2929
#
3030
# [*allowed_hosts*]
3131
# (optional) Additional hosts that are allowed to access this DB
@@ -45,8 +45,8 @@
4545
$dbname = 'nova',
4646
$user = 'nova',
4747
$host = '127.0.0.1',
48-
$charset = 'latin1',
49-
$collate = 'latin1_swedish_ci',
48+
$charset = 'utf8',
49+
$collate = 'utf8_unicode_ci',
5050
$allowed_hosts = undef,
5151
$mysql_module = '0.9',
5252
$cluster_id = undef

spec/classes/nova_db_mysql_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
it { should contain_mysql__db('nova').with(
2424
:user => 'nova',
2525
:password => 'qwerty',
26-
:charset => 'latin1',
26+
:charset => 'utf8',
2727
:require => "Class[Mysql::Config]"
2828
)}
2929
end
3030

3131
context 'when overriding charset' do
3232
let :params do
33-
{ :charset => 'utf8' }.merge(required_params)
33+
{ :charset => 'latin1' }.merge(required_params)
3434
end
3535

3636
it { should contain_mysql__db('nova').with_charset(params[:charset]) }
@@ -50,14 +50,14 @@
5050
it { should contain_mysql__db('nova').with(
5151
:user => 'nova',
5252
:password => 'qwerty',
53-
:charset => 'latin1',
53+
:charset => 'utf8',
5454
:require => "Class[Mysql::Config]"
5555
)}
5656
end
5757

5858
context 'when overriding charset' do
5959
let :params do
60-
{ :charset => 'utf8' }.merge(required_params)
60+
{ :charset => 'latin1' }.merge(required_params)
6161
end
6262

6363
it { should contain_mysql__db('nova').with_charset(params[:charset]) }

0 commit comments

Comments
 (0)