add ft_min_word_len and ft_max_word_len config options

This commit is contained in:
Daniel De Marco 2013-07-04 21:33:53 -04:00
parent 0dfa6a4857
commit e12eb0e19f
3 changed files with 23 additions and 3 deletions

View file

@ -68,6 +68,8 @@
# specified database and table name patterns. # specified database and table name patterns.
# [*replicate_wild_ignore_table] - Tells the slave thread not to # [*replicate_wild_ignore_table] - Tells the slave thread not to
# replicate a statement where any table matches the given wildcard pattern. # replicate a statement where any table matches the given wildcard pattern.
# [*ft_min_word_len*] - minimum length of words to be indexed by mysql
# [*ft_max_word_len*] - maximum length of words to be indexed by mysql
# #
# Actions: # Actions:
# #
@ -125,7 +127,9 @@ class mysql::config(
$log_bin_trust_function_creators = 'UNSET', $log_bin_trust_function_creators = 'UNSET',
$replicate_ignore_table = 'UNSET', $replicate_ignore_table = 'UNSET',
$replicate_wild_do_table = 'UNSET', $replicate_wild_do_table = 'UNSET',
$replicate_wild_ignore_table = 'UNSET' $replicate_wild_ignore_table = 'UNSET',
$ft_min_word_len = 'UNSET',
$ft_max_word_len = 'UNSET'
) inherits mysql { ) inherits mysql {
File { File {

View file

@ -33,7 +33,9 @@ describe 'mysql::config' do
:log_bin_trust_function_creators => 'UNSET', :log_bin_trust_function_creators => 'UNSET',
:replicate_ignore_table => 'UNSET', :replicate_ignore_table => 'UNSET',
:replicate_wild_do_table => 'UNSET', :replicate_wild_do_table => 'UNSET',
:replicate_wild_ignore_table => 'UNSET' :replicate_wild_ignore_table => 'UNSET',
:ft_min_word_len => 'UNSET',
:ft_max_word_len => 'UNSET'
} }
end end
@ -153,7 +155,9 @@ describe 'mysql::config' do
:tmp_table_size => '4096M', :tmp_table_size => '4096M',
:max_heap_table_size => '4096M', :max_heap_table_size => '4096M',
:table_open_cache => 2048, :table_open_cache => 2048,
:long_query_time => 0.5 :long_query_time => 0.5,
:ft_min_word_len => 3,
:ft_max_word_len => 10
} }
].each do |passed_params| ].each do |passed_params|
@ -232,6 +236,12 @@ describe 'mysql::config' do
if param_values[:long_query_time] != 'UNSET' if param_values[:long_query_time] != 'UNSET'
expected_lines = expected_lines | [ "long_query_time = #{param_values[:long_query_time]}" ] expected_lines = expected_lines | [ "long_query_time = #{param_values[:long_query_time]}" ]
end end
if param_values[:ft_min_word_len] != 'UNSET'
expected_lines = expected_lines | [ "ft_min_word_len = #{param_values[:ft_min_word_len]}" ]
end
if param_values[:ft_max_word_len] != 'UNSET'
expected_lines = expected_lines | [ "ft_max_word_len = #{param_values[:ft_max_word_len]}" ]
end
if param_values[:default_engine] != 'UNSET' if param_values[:default_engine] != 'UNSET'
expected_lines = expected_lines | [ "default-storage-engine = #{param_values[:default_engine]}" ] expected_lines = expected_lines | [ "default-storage-engine = #{param_values[:default_engine]}" ]
else else

View file

@ -74,6 +74,12 @@ replicate-wild-do-table = <%= @replicate_wild_do_table %>
<% if @replicate_wild_ignore_table != 'UNSET' -%> <% if @replicate_wild_ignore_table != 'UNSET' -%>
replicate-wild-ignore-table = <%= @replicate_wild_ignore_table %> replicate-wild-ignore-table = <%= @replicate_wild_ignore_table %>
<% end -%> <% end -%>
<% if @ft_min_word_len != 'UNSET' -%>
ft_min_word_len = <%= @ft_min_word_len %>
<% end -%>
<% if @ft_max_word_len != 'UNSET' -%>
ft_max_word_len = <%= @ft_max_word_len %>
<% end -%>
<% if @log_error != 'syslog' -%> <% if @log_error != 'syslog' -%>
log_error = <%= @log_error %> log_error = <%= @log_error %>