TeslaCN commented on code in PR #17611: URL: https://github.com/apache/shardingsphere/pull/17611#discussion_r876798582
########## shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/mysql/MySQLAdminExecutorCreator.java: ########## @@ -159,14 +159,12 @@ private boolean isQuerySpecialSchema(final SelectStatement sqlStatement, final S private DatabaseAdminExecutor mockExecutor(final String schemaName, final SelectStatement sqlStatement, final String sql) { boolean isNotUseSchema = !Optional.ofNullable(schemaName).isPresent() && sqlStatement.getFrom() == null; + if (!hasDatabases() || !hasResources()) { + return new NoResourceShowExecutor(sqlStatement); + } + String driverType = ProxyContext.getInstance().getContextManager().getMetaDataContexts().getProps().getValue(ConfigurationPropertyKey.PROXY_BACKEND_DRIVER_TYPE); Review Comment: Getting driver type can be moved into `if (isNotUseSchema)` block to reduce unnecessary overhead since `isNotUseSchema` is not always `true`. -- 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: notifications-unsubscr...@shardingsphere.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org