DBZ-1218 Close JDBC connection in SnapshotReader for MySQL Connector
This commit is contained in:
parent
7c0ae3ee20
commit
08271ab444
@ -720,6 +720,14 @@ protected void execute() {
|
|||||||
}
|
}
|
||||||
failed(e, "Aborting snapshot due to error when last running '" + sql.get() + "': " + e.getMessage());
|
failed(e, "Aborting snapshot due to error when last running '" + sql.get() + "': " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
finally {
|
||||||
|
try {
|
||||||
|
mysql.close();
|
||||||
|
}
|
||||||
|
catch (SQLException e) {
|
||||||
|
logger.warn("Failed to close the connection properly", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void readBinlogPosition(int step, SourceInfo source, JdbcConnection mysql, AtomicReference<String> sql) throws SQLException {
|
protected void readBinlogPosition(int step, SourceInfo source, JdbcConnection mysql, AtomicReference<String> sql) throws SQLException {
|
||||||
|
Loading…
Reference in New Issue
Block a user