You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/07/24 04:18:43 UTC
[GitHub] [shardingsphere] terrymanu commented on a diff in pull request #19445: Fix #19224
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org