diff --git a/.fixtures.yml b/.fixtures.yml index cecf6f5..1ec2306 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,5 +1,6 @@ fixtures: repositories: "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib" + "create_resources": "git://github.com/puppetlabs/puppetlabs-create_resources.git" symlinks: "mysql": "#{source_dir}" diff --git a/spec/classes/mysql_config_spec.rb b/spec/classes/mysql_config_spec.rb index 953c287..3b882ba 100644 --- a/spec/classes/mysql_config_spec.rb +++ b/spec/classes/mysql_config_spec.rb @@ -56,7 +56,7 @@ describe 'mysql::config' do :config_file => '/var/db/mysql/my.cnf', :socket => '/tmp/mysql.sock', :pidfile => '/var/db/mysql/mysql.pid', - :root_group => 'wheel', + :root_group => 'wheel' }, 'Redhat' => { :datadir => '/var/lib/mysql', @@ -128,6 +128,9 @@ describe 'mysql::config' do :ssl_ca => '/path/to/cacert.pem', :ssl_cert => '/path/to/server-cert.pem', :ssl_key => '/path/to/server-key.pem', + :key_buffer => '16M', + :thread_stack => '256K', + :query_cache_size => '16M', :character_set => 'utf8', :max_connections => 1000, :tmp_table_size => '4096M', diff --git a/templates/my.cnf.erb b/templates/my.cnf.erb index d27073a..daec8ea 100644 --- a/templates/my.cnf.erb +++ b/templates/my.cnf.erb @@ -1,9 +1,10 @@ [client] -port = <%= port %> -socket = <%= socket %> +port = <%= @port %> +socket = <%= @socket %> <% if @character_set != 'UNSET' -%> default-character-set = <%= @character_set %> -<% end %> +<% end -%> + [mysqld_safe] socket = <%= @socket %> nice = 0 @@ -20,7 +21,7 @@ datadir = <%= @datadir %> tmpdir = /tmp skip-external-locking -<% if bind_address -%> +<% if @bind_address -%> bind-address = <%= @bind_address %> <% end -%> key_buffer = <%= @key_buffer %> @@ -73,10 +74,10 @@ replicate-wild-do-table = <%= @replicate_wild_do_table %> replicate-wild-ignore-table = <%= @replicate_wild_ignore_table %> <% end -%> -<% if log_error != 'syslog' -%> -log_error = <%= log_error %> +<% if @log_error != 'syslog' -%> +log_error = <%= @log_error %> <% end -%> -<% if default_engine != 'UNSET' %> +<% if @default_engine != 'UNSET' %> default-storage-engine = <%= @default_engine %> <% end -%> <% if @character_set != 'UNSET' -%>