Skip to content

Commit

Permalink
[Improve][connector-cdc-mysql] avoid listing tables under unnecessary…
Browse files Browse the repository at this point in the history
… databases (#5365)
  • Loading branch information
lvyanquan authored Aug 31, 2023
1 parent b3ba5eb commit 3e5d018
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ public static List<TableId> listTables(JdbcConnection jdbc, RelationalTableFilte
"SHOW DATABASES",
rs -> {
while (rs.next()) {
databaseNames.add(rs.getString(1));
String databaseName = rs.getString(1);
if (tableFilters.databaseFilter().test(databaseName)) {
databaseNames.add(databaseName);
}
}
});
LOG.info("\t list of available databases is: {}", databaseNames);
Expand Down

0 comments on commit 3e5d018

Please sign in to comment.