Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void startBootstrap(BootstrapTask task, AbstractProducer producer, Long c
}

private Schema captureSchemaForBootstrap(BootstrapTask task) throws SQLException {
try ( Connection cx = getConnection(task.database) ) {
try ( Connection cx = getSchemaConnection(task.database) ) {
CaseSensitivity s = MaxwellMysqlStatus.captureCaseSensitivity(cx);
SchemaCapturer c = new SchemaCapturer(cx, s, task.database, task.table);
return c.capture();
Expand Down Expand Up @@ -143,6 +143,12 @@ protected Connection getConnection(String databaseName) throws SQLException {
return conn;
}

protected Connection getSchemaConnection(String databaseName) throws SQLException {
Connection conn = context.getSchemaConnectionPool().getConnection();
conn.setCatalog(databaseName);
return conn;
}

protected Connection getStreamingConnection(String databaseName) throws SQLException, URISyntaxException {
Connection conn = DriverManager.getConnection(context.getConfig().replicationMysql.getConnectionURI(false), context.getConfig().replicationMysql.user, context.getConfig().replicationMysql.password);
conn.setCatalog(databaseName);
Expand Down