未验证 提交 a668c46e 编写于 作者: M mask 提交者: GitHub

[fix-7750]Compatible historical version data source connection information(#7750) (#7751)

上级 4d525536
......@@ -98,12 +98,11 @@ public class JdbcDataSourceProvider {
logger.warn("Jdbc driver loading error. Driver {} cannot accept url.", drv);
throw new RuntimeException("Jdbc driver loading error.");
}
if (dbType.equals(DbType.MYSQL)) {
if (driver.getMajorVersion() >= 8) {
properties.setDriverClassName(drv);
} else {
properties.setDriverClassName(Constants.COM_MYSQL_JDBC_DRIVER);
}
//Compatible historical version data source connection information
if (dbType.equals(DbType.MYSQL) && driver.getMajorVersion() <= 8) {
properties.setDriverClassName(Constants.COM_MYSQL_JDBC_DRIVER);
} else {
properties.setDriverClassName(drv);
}
} catch (final Exception e) {
logger.warn("The specified driver not suitable.");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册