Skip to content

Commit 7caebdb

Browse files
author
Ashley Penney
committed
Merge pull request #427 from radford/my-cnf-undef
Allow override_options set to undef to completely remove the corresponding key reverting to the mysql default
2 parents c747ea7 + 56e81a3 commit 7caebdb

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ For items that you would traditionally represent as:
8282
thing = X
8383
</pre>
8484

85-
You can just make an entry like `thing => true`, `thing => value`, or `thing => "` in the hash. You can also pass an array `thing => ['value', 'value2']` or even list each `thing => value` separately on separate lines. MySQL doesn't care if 'thing' is alone or set to a value; it'll happily accept both.
86-
85+
You can just make an entry like `thing => true`, `thing => value`, or `thing => "` in the hash. You can also pass an array `thing => ['value', 'value2']` or even list each `thing => value` separately on separate lines. MySQL doesn't care if 'thing' is alone or set to a value; it'll happily accept both. To keep an option out of the my.cnf file, e.g. when using override_options to revert to a default value, you can pass thing => undef.
8786
If an option needs multiple instances, you can pass an array. For example
8887

8988
```puppet
@@ -164,7 +163,7 @@ For items that you would traditionally represent as:
164163
thing = X
165164
</pre>
166165

167-
You can just make an entry like `thing => true`, `thing => value`, or `thing => "` in the hash. You can also pass an array `thing => ['value', 'value2']` or even list each `thing => value` separately on separate lines. MySQL doesn't care if 'thing' is alone or set to a value; it'll happily accept both.
166+
You can just make an entry like `thing => true`, `thing => value`, or `thing => "` in the hash. You can also pass an array `thing => ['value', 'value2']` or even list each `thing => value` separately on separate lines. MySQL doesn't care if 'thing' is alone or set to a value; it'll happily accept both. To keep an option out of the my.cnf file, e.g. when using override_options to revert to a default value, you can pass thing => undef.
168167

169168
#####`config_file`
170169

templates/my.cnf.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<% vi.each do |vii| -%>
99
<%= ki %> = <%= vii %>
1010
<% end -%>
11-
<% else -%>
11+
<% elsif vi != :undef -%>
1212
<%= ki %> = <%= vi %>
1313
<% end -%>
1414
<% end -%>

0 commit comments

Comments
 (0)