Commit 36ad98ee authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Binlog filtering options should be configurable through CWMP

parent 787bf242
...@@ -23,6 +23,8 @@ entry_execute_method_root_MySQL() { ...@@ -23,6 +23,8 @@ entry_execute_method_root_MySQL() {
common_execute_method_param "$DMROOT.MySQL.ServerID" "1" "mysql_get_server_id" "mysql_set_server_id" common_execute_method_param "$DMROOT.MySQL.ServerID" "1" "mysql_get_server_id" "mysql_set_server_id"
common_execute_method_param "$DMROOT.MySQL.WSREPGTIDdomainID" "1" "mysql_get_wsrep_gtid_domain_id" "mysql_set_wsrep_gtid_domain_id" common_execute_method_param "$DMROOT.MySQL.WSREPGTIDdomainID" "1" "mysql_get_wsrep_gtid_domain_id" "mysql_set_wsrep_gtid_domain_id"
common_execute_method_param "$DMROOT.MySQL.GTIDdomainID" "1" "mysql_get_gtid_domain_id" "mysql_set_gtid_domain_id" common_execute_method_param "$DMROOT.MySQL.GTIDdomainID" "1" "mysql_get_gtid_domain_id" "mysql_set_gtid_domain_id"
common_execute_method_param "$DMROOT.MySQL.BinLogDoDB" "1" "mysql_get_binlog_do_db" "mysql_set_binlog_do_db"
common_execute_method_param "$DMROOT.MySQL.BinLogIgnoreDB" "1" "mysql_get_binlog_ignore_db" "mysql_set_binlog_ignore_db"
return 0; return 0;
;; ;;
esac esac
...@@ -141,3 +143,31 @@ mysql_set_gtid_domain_id() { ...@@ -141,3 +143,31 @@ mysql_set_gtid_domain_id() {
systemctl restart mariadb systemctl restart mariadb
fi fi
} }
mysql_get_binlog_do_db() {
echo `$UCI_GET mariadb.binlog.binlog_do_db`
}
mysql_set_binlog_do_db() {
local binlog_do_db=`$UCI_GET mariadb.binlog.binlog_do_db`
if [ "$binlog_do_db" != "$1" ]; then
$UCI_SET mariadb.binlog.binlog_do_db="$1"
$UCI_COMMIT
wsrep-init
systemctl restart mariadb
fi
}
mysql_get_binlog_ignore_db() {
echo `$UCI_GET mariadb.binlog.binlog_ignore_db`
}
mysql_set_binlog_ignore_db() {
local binlog_ignore_db=`$UCI_GET mariadb.binlog.binlog_ignore_db`
if [ "$binlog_ignore_db" != "$1" ]; then
$UCI_SET mariadb.binlog.binlog_ignore_db="$1"
$UCI_COMMIT
wsrep-init
systemctl restart mariadb
fi
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment