Skip to content

Commit

Permalink
Fix the bug that data loss caused by merging data. (#771)
Browse files Browse the repository at this point in the history
* 修复合并数据导致数据丢失问题

* 优化代码
  • Loading branch information
guandeng authored Dec 5, 2024
1 parent dc73f0a commit e99c012
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Consumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ protected function makeReplication(): MySQLReplicationFactory
{
$connection = $this->connection;
// Get databases of replication
$databasesOnly = array_replace(
$databasesOnly = array_merge(
$this->config->get('databases_only', []),
$this->triggerManager->getDatabases($connection)
);
// Get tables of replication
$tablesOnly = array_replace(
$tablesOnly = array_merge(
$this->config->get('tables_only', []),
$this->triggerManager->getTables($connection)
);
Expand Down

0 comments on commit e99c012

Please sign in to comment.