mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for dbType
This commit is contained in:
@@ -336,6 +336,10 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
||||
this.id = DruidDriver.createDataSourceId();
|
||||
|
||||
loadFilterFromSystemProperty();
|
||||
|
||||
if (this.dbType == null || this.dbType.length() == 0) {
|
||||
this.dbType = JdbcUtils.getDbType(jdbcUrl, null);
|
||||
}
|
||||
|
||||
for (Filter filter : filters) {
|
||||
filter.init(this);
|
||||
|
||||
@@ -58,6 +58,10 @@ public class WallFilter extends FilterAdapter implements WallFilterMBean {
|
||||
if (this.dbType == null || this.dbType.trim().length() == 0) {
|
||||
this.dbType = dataSource.getDbType();
|
||||
}
|
||||
|
||||
if (dbType == null) {
|
||||
dbType = JdbcUtils.getDbType(dataSource.getUrl(), null);
|
||||
}
|
||||
|
||||
if (JdbcUtils.MYSQL.equals(dbType)) {
|
||||
if (config == null) {
|
||||
|
||||
Reference in New Issue
Block a user