From b2bc1abd7f29732a7169a001747d3992af9d71d6 Mon Sep 17 00:00:00 2001 From: Fan Yang Date: Thu, 2 Jan 2025 16:19:23 +0000 Subject: [PATCH] fix: correct CHANGE REPLICATION FILTER' statement --- devtools/replica-setup-mysql/start_replication.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/devtools/replica-setup-mysql/start_replication.sh b/devtools/replica-setup-mysql/start_replication.sh index 4453ba2..6b3e24c 100644 --- a/devtools/replica-setup-mysql/start_replication.sh +++ b/devtools/replica-setup-mysql/start_replication.sh @@ -26,16 +26,16 @@ fi # Prepare replication filters REPLICATION_FILTERS="" if [ -n "$INCLUDE_SCHEMAS" ]; then - REPLICATION_FILTERS="$REPLICATION_FILTERS REPLICATE_DO_DB=(${INCLUDE_SCHEMAS})" + REPLICATION_FILTERS="REPLICATE_DO_DB=(${INCLUDE_SCHEMAS})" fi if [ -n "$EXCLUDE_SCHEMAS" ]; then - REPLICATION_FILTERS="$REPLICATION_FILTERS REPLICATE_IGNORE_DB=(${EXCLUDE_SCHEMAS})" + REPLICATION_FILTERS="${REPLICATION_FILTERS}${REPLICATION_FILTERS:+, }REPLICATE_IGNORE_DB=(${EXCLUDE_SCHEMAS})" fi if [ -n "$INCLUDE_TABLES" ]; then - REPLICATION_FILTERS="$REPLICATION_FILTERS REPLICATE_DO_TABLE=(${INCLUDE_TABLES})" + REPLICATION_FILTERS="${REPLICATION_FILTERS}${REPLICATION_FILTERS:+, }REPLICATE_DO_TABLE=(${INCLUDE_TABLES})" fi if [ -n "$EXCLUDE_TABLES" ]; then - REPLICATION_FILTERS="$REPLICATION_FILTERS REPLICATE_IGNORE_TABLE=(${EXCLUDE_TABLES})" + REPLICATION_FILTERS="${REPLICATION_FILTERS}${REPLICATION_FILTERS:+, }REPLICATE_IGNORE_TABLE=(${EXCLUDE_TABLES})" fi # Add filter command if any filters are set