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 (apache#5365)
  • Loading branch information
lvyanquan authored and Zhouwen-CN committed Sep 11, 2023
1 parent 2ba6e6a commit 223a976
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 223a976

Please sign in to comment.