amirhmd commented on issue #34224:
URL: 
https://github.com/apache/shardingsphere/issues/34224#issuecomment-2592867749

   @RaigorJiang the fix could be broader than below code:
   ```
     public ShardingSphereDatabase getUsedDatabase() {
               ShardingSpherePreconditions.checkNotEmpty(usedDatabaseNames, 
NoDatabaseSelectedException::new); // this line
               ShardingSpherePreconditions.checkState(usedDatabaseNames.size() 
<= 1,
                       () -> new 
UnsupportedSQLOperationException(String.format("Can not support multiple logic 
databases [%s]", Joiner.on(", ").join(usedDatabaseNames))));
               String databaseName = usedDatabaseNames.iterator().next();
               
ShardingSpherePreconditions.checkState(metaData.containsDatabase(databaseName), 
() -> new UnknownDatabaseException(databaseName));
               return metaData.getDatabase(databaseName);
     }
   ```
   or it should be handle earlier like `ConnectionSession`?


-- 
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

Reply via email to