Skip to content

Commit 00b079a

Browse files
committed
Using syncrule id for MySQL serverId
1 parent 618b10e commit 00b079a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/module-mysql/src/replication/BinLogStream.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import async from 'async';
55
import { ColumnDescriptor, framework, getUuidReplicaIdentityBson, Metrics, storage } from '@powersync/service-core';
66
import mysql, { FieldPacket } from 'mysql2';
77

8-
import { BinLogEvent, TableMapEntry } from '@powersync/mysql-zongji';
8+
import { BinLogEvent, StartOptions, TableMapEntry } from '@powersync/mysql-zongji';
99
import * as common from '../common/common-index.js';
1010
import * as zongji_utils from './zongji/zongji-utils.js';
1111
import { MySQLConnectionManager } from './MySQLConnectionManager.js';
@@ -466,8 +466,9 @@ AND table_type = 'BASE TABLE';`,
466466
excludeEvents: [],
467467
includeSchema: { [this.defaultSchema]: includedTables },
468468
filename: binLogPositionState.filename,
469-
position: binLogPositionState.offset
470-
});
469+
position: binLogPositionState.offset,
470+
serverId: this.storage.group_id
471+
} satisfies StartOptions);
471472

472473
// Forever young
473474
await new Promise<void>((resolve, reject) => {

0 commit comments

Comments
 (0)