This is an automated email from the ASF dual-hosted git repository.

jiangmaolin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new dff69639d93 Fix missing logic db when query 
information_schema.SCHEMATA with NOT IN clause (#33348)
dff69639d93 is described below

commit dff69639d93c5bb919dc3b346253d5444f6dcc2e
Author: Raigor <[email protected]>
AuthorDate: Tue Oct 22 17:32:06 2024 +0800

    Fix missing logic db when query information_schema.SCHEMATA with NOT IN 
clause (#33348)
---
 .../admin/executor/information/SelectInformationSchemataExecutor.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/proxy/backend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/information/SelectInformationSchemataExecutor.java
 
b/proxy/backend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/information/SelectInformationSchemataExecutor.java
index 0f463b38210..972c9ab8fe7 100644
--- 
a/proxy/backend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/information/SelectInformationSchemataExecutor.java
+++ 
b/proxy/backend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/information/SelectInformationSchemataExecutor.java
@@ -142,7 +142,7 @@ public final class SelectInformationSchemataExecutor 
extends DefaultDatabaseMeta
     protected void preProcess(final String databaseName, final Map<String, 
Object> rows, final Map<String, String> alias) throws SQLException {
         ResourceMetaData resourceMetaData = 
ProxyContext.getInstance().getContextManager().getMetaDataContexts().getMetaData().getDatabase(databaseName).getResourceMetaData();
         Collection<String> catalogs = getCatalogs(resourceMetaData);
-        schemaNameAlias = alias.getOrDefault(SCHEMA_NAME, "");
+        schemaNameAlias = alias.getOrDefault(SCHEMA_NAME, 
alias.getOrDefault(schemaNameAlias, schemaNameAlias));
         String rowValue = rows.getOrDefault(schemaNameAlias, "").toString();
         queryDatabase = !rowValue.isEmpty();
         if (catalogs.contains(rowValue)) {

Reply via email to