[FLINK-37855-][cdc-connector-mysql] Reduce the time cost in MySqlSchemaUtils#listTables
https://issues.apache.org/jira/browse/FLINK-37855 MySqlSchemaUtils#listTables and TableDiscoveryUtils#listTables is called to get the table names of all tables that need to be processed, However, in scenarios involving many databases and tables, this method call will require querying the database many times, resulting in a long processing time. The optimization idea is to use mysql's metadata information, a connection to get all the library table information.
I think the key point is reusing the connection, instead of changing the query sql. So passing Connection to listTables() method will be better.
This pull request has been automatically marked as stale because it has not had recent activity for 120 days. It will be closed in 60 days if no further activity occurs.