Skip to content

Commit 190188f

Browse files
committed
Use the applied fix
1 parent 9e8e4f4 commit 190188f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mysql_ch_replicator/converter.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,11 +531,14 @@ def get_db_and_table_name(self, token, db_name):
531531
db_name = strip_sql_name(db_name)
532532
table_name = strip_sql_name(table_name)
533533
if self.db_replicator:
534-
if db_name == self.db_replicator.database:
535-
db_name = self.db_replicator.target_database
534+
# Check if database and table match config BEFORE applying mapping
536535
matches_config = (
537536
self.db_replicator.config.is_database_matches(db_name)
538537
and self.db_replicator.config.is_table_matches(table_name))
538+
539+
# Apply database mapping AFTER checking matches_config
540+
if db_name == self.db_replicator.database:
541+
db_name = self.db_replicator.target_database
539542
else:
540543
matches_config = True
541544

0 commit comments

Comments
 (0)