datastrato / gravitino

World's most powerful data catalog service with providing a high-performance, geo-distributed and federated metadata lake.
https://datastrato.ai/docs/
Apache License 2.0
347 stars 150 forks source link

[#3002] fix(jdbc-mysql): Fix MySQL list tables bugs. #3229

Closed yuqi1129 closed 1 week ago

yuqi1129 commented 2 weeks ago

What changes were proposed in this pull request?

Set the connection database to the database passed by the method when getting the JDBC connection.

Why are the changes needed?

connection.getSchema() is null for MySQL and thus will cause the problem that list operation will get all tables in the MySQL instance NOT a specific database.

Fix: #3002

Does this PR introduce any user-facing change?

N/A.

How was this patch tested?

New UT was added.

jerryshao commented 2 weeks ago

Do we have a similar problem in PG and Doris?

yuqi1129 commented 2 weeks ago

Do we have a similar problem in PG and Doris?

Yes, I have checked, the changes in the PR is in the module jdbc-common and will fix a similar issue in all JDBC catalogs.

jerryshao commented 1 week ago

@yuqi1129 can you please move forward this PR?

yuqi1129 commented 1 week ago

@yuqi1129 can you please move forward this PR?

Yeah, A related PR has just been merged, I will rebase it soon.

yuqi1129 commented 1 week ago

@danhuawang Could you kindly verify if the performance test has returned to normal since today? It appears that this issue has been resolved by https://github.com/datastrato/gravitino/pull/3316.

yuqi1129 commented 1 week ago

@danhuawang confirmed that the problem has been resolved by #3316 and the PR will be temporarily closed.