Skip to content

Commit a668c46

Browse files
authored
[fix-7750]Compatible historical version data source connection information(#7750) (#7751)
1 parent 4d52553 commit a668c46

File tree

1 file changed

+5
-6
lines changed
  • dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-api/src/main/java/org/apache/dolphinscheduler/plugin/datasource/api/provider

1 file changed

+5
-6
lines changed

Diff for: dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-api/src/main/java/org/apache/dolphinscheduler/plugin/datasource/api/provider/JdbcDataSourceProvider.java

+5-6
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,11 @@ protected static void loaderJdbcDriver(ClassLoader classLoader, BaseConnectionPa
9898
logger.warn("Jdbc driver loading error. Driver {} cannot accept url.", drv);
9999
throw new RuntimeException("Jdbc driver loading error.");
100100
}
101-
if (dbType.equals(DbType.MYSQL)) {
102-
if (driver.getMajorVersion() >= 8) {
103-
properties.setDriverClassName(drv);
104-
} else {
105-
properties.setDriverClassName(Constants.COM_MYSQL_JDBC_DRIVER);
106-
}
101+
//Compatible historical version data source connection information
102+
if (dbType.equals(DbType.MYSQL) && driver.getMajorVersion() <= 8) {
103+
properties.setDriverClassName(Constants.COM_MYSQL_JDBC_DRIVER);
104+
} else {
105+
properties.setDriverClassName(drv);
107106
}
108107
} catch (final Exception e) {
109108
logger.warn("The specified driver not suitable.");

0 commit comments

Comments
 (0)