zhzhenqin commented on code in PR #7307:
URL: https://github.com/apache/kyuubi/pull/7307#discussion_r2693816057
##########
externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/dialect/MySQLDialect.scala:
##########
@@ -60,8 +64,11 @@ class MySQLDialect extends JdbcDialect {
filters += s"$TABLE_CATALOG = '$catalog'"
}
- if (StringUtils.isNotBlank(schema)) {
+ // when DBeaver connect use %, kyuubi to return all tables from all other
databases.
+ if (StringUtils.isNotBlank(schema) && !"%".equals(schema)) {
Review Comment:
like MySQLDialect(mysql, doris, starrocks) use:
SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, ENGINE,
TABLE_ROWS, AVG_ROW_LENGTH, DATA_LENGTH,
CREATE_TIME, UPDATE_TIME, TABLE_COLLATION, TABLE_COMMENT
FROM INFORMATION_SCHEMA.TABLES
当 Dbeaver 连接时,会采用 % 作为参数,这样或造成返回给 Dbeaver 所有库下的所有的表。
1. 和session配置的DB 不符,用户看到了其他数据库下的表(所有表);
2. Dbeaver 在执行查询时,schema 不对,查询报错;
When connecting with Dbeaver, it uses '%' as a parameter, which may cause
Dbeaver to return tables from all databases.
1. The database configuration may differ from the session's database,
resulting in tables from other databases being displayed;
2. Dbeaver may encounter query errors due to an incorrect schema.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]