Skip to content

Commit

Permalink
Merge pull request #28 from hostinger/add/replicate_do_db
Browse files Browse the repository at this point in the history
Add replicate_do_db
  • Loading branch information
PovilasV1 authored Nov 7, 2023
2 parents 73c06cb + efc699e commit 53c57d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
default['percona']['server']['replication']['replication_sql'] = '/etc/mysql/replication.sql'
default['percona']['server']['replication']['slave_transaction_retries'] = 10
default['percona']['server']['replication']['slave_exec_mode'] = 'IDEMPOTENT'
default['percona']['server']['replication']['replicate_do_db'] = []

# Mysqld_safe
default['percona']['server']['skip_syslog'] = false
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
description 'Installs Percona MySQL client and server'
source_url 'https://github.com/hostinger/chef-percona'
issues_url 'https://github.com/hostinger/chef-percona/issues'
version '5.11.25'
version '5.11.26'
chef_version '>= 16.0'

depends 'yum'
Expand Down
6 changes: 6 additions & 0 deletions templates/my.cnf.main.erb
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,12 @@ replicate-ignore-db = <%= ignore_db %>
<% end -%>
<% end -%>

<% unless node["percona"]["server"]["replication"]["replicate_do_db"].empty? %>
<% Array(node["percona"]["server"]["replication"]["replicate_do_db"]).each do |db| -%>
replicate-do-db = <%= db %>
<% end -%>
<% end -%>

<% unless node["percona"]["server"]["replication"]["ignore_table"].empty? %>
# Creates a replication filter by telling the replica SQL thread not to replicate any statement that updates the specified table, even if any other tables might be updated by the same statement.
<% node["percona"]["server"]["replication"]["ignore_table"].each do |ignore_table| -%>
Expand Down

0 comments on commit 53c57d0

Please sign in to comment.