terrymanu commented on code in PR #19445:
URL: https://github.com/apache/shardingsphere/pull/19445#discussion_r928193120


##########
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/props/DataSourcePropertiesValidator.java:
##########
@@ -69,7 +71,9 @@ private void validate(final String dataSourceName, final 
DataSourceProperties da
         }
     }
     
-    private void checkFailFast(final DataSource dataSource) throws 
SQLException {
-        dataSource.getConnection();
+    private void checkFailFast(final DataSource dataSource, final DatabaseType 
databaseType) throws SQLException {
+        if 
(!dataSource.getConnection().getMetaData().getDatabaseProductName().equals(databaseType.getType()))
 {
+            throw new SQLException("Protocol mismatch for datasource.");

Review Comment:
   data source are 2 words, please split them



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

Reply via email to