Skip to content

Commit e62270e

Browse files
committed
Add program_name for MySQL.
1 parent 74cfadf commit e62270e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,16 @@ export class BinLogReplicationJob extends replication.AbstractReplicationJob {
5555
// such as caused by cached PG schemas.
5656
const connectionManager = this.connectionFactory.create({
5757
// Pool connections are only used intermittently.
58-
idleTimeout: 30_000
58+
idleTimeout: 30_000,
59+
60+
connectAttributes: {
61+
// https://dev.mysql.com/doc/refman/8.0/en/performance-schema-connection-attribute-tables.html
62+
// These do not appear to be supported by Zongji yet, so we only specify it here.
63+
// Query using `select * from performance_schema.session_connect_attrs`.
64+
program_name: 'powersync'
65+
66+
// _client_name and _client_version is specified by the driver
67+
}
5968
});
6069
try {
6170
await this.rateLimiter?.waitUntilAllowed({ signal: this.abortController.signal });

0 commit comments

Comments
 (0)