fix dm function bug

This commit is contained in:
SwallowGG
2023-09-06 16:37:11 +08:00
committed by JiaJu Zhuang
parent 33cd368db8
commit 1af4d3f020
2 changed files with 39 additions and 6 deletions

View File

@ -78,13 +78,16 @@ public class IDriverManager {
if (url == null) {
throw new SQLException("The url cannot be null", "08001");
}
SQLException reason = null;
DriverEntry driverEntry = DRIVER_ENTRY_MAP.get(driver.getJdbcDriver());
if (driverEntry == null) {
driverEntry = getJDBCDriver(driver);
}
try {
return driverEntry.getDriver().connect(url, info);
Connection connection = driverEntry.getDriver().connect(url, info);
if(connection == null){
throw new ConnectionException("driverEntry.getDriver().connect return null",null);
}
return connection;
} catch (SQLException var7) {
Connection con = tryConnectionAgain(driverEntry, url, info);
if (con != null) {