mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Merge pull request #1213 from wenshao/master
bug fixed filter.int dbType is null, for issue 1193. #1193
This commit is contained in:
@@ -590,15 +590,15 @@ public class DruidDataSource extends DruidAbstractDataSource
|
||||
this.jdbcUrl = this.jdbcUrl.trim();
|
||||
initFromWrapDriverUrl();
|
||||
}
|
||||
|
||||
for (Filter filter : filters) {
|
||||
filter.init(this);
|
||||
}
|
||||
|
||||
if (this.dbType == null || this.dbType.length() == 0) {
|
||||
this.dbType = JdbcUtils.getDbType(jdbcUrl, null);
|
||||
}
|
||||
|
||||
for (Filter filter : filters) {
|
||||
filter.init(this);
|
||||
}
|
||||
|
||||
if (JdbcConstants.MYSQL.equals(this.dbType) || //
|
||||
JdbcConstants.MARIADB.equals(this.dbType)) {
|
||||
boolean cacheServerConfigurationSet = false;
|
||||
|
||||
@@ -41,7 +41,7 @@ public class OdpsMultiInsertTest extends TestCase {
|
||||
}
|
||||
|
||||
public void exec_test(String resource) throws Exception {
|
||||
System.out.println(resource);
|
||||
// System.out.println(resource);
|
||||
InputStream is = null;
|
||||
|
||||
is = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource);
|
||||
@@ -61,13 +61,13 @@ public class OdpsMultiInsertTest extends TestCase {
|
||||
SchemaStatVisitor visitor = new OdpsSchemaStatVisitor();
|
||||
stmt.accept(visitor);
|
||||
|
||||
System.out.println(sql);
|
||||
System.out.println("Tables : " + visitor.getTables());
|
||||
System.out.println("fields : " + visitor.getColumns());
|
||||
|
||||
System.out.println();
|
||||
System.out.println("---------------------------");
|
||||
System.out.println(SQLUtils.toOdpsString(stmt));
|
||||
// System.out.println(sql);
|
||||
// System.out.println("Tables : " + visitor.getTables());
|
||||
// System.out.println("fields : " + visitor.getColumns());
|
||||
//
|
||||
// System.out.println();
|
||||
// System.out.println("---------------------------");
|
||||
// System.out.println(SQLUtils.toOdpsString(stmt));
|
||||
}
|
||||
|
||||
void mergValidate(String sql, String expect) {
|
||||
@@ -82,7 +82,7 @@ public class OdpsMultiInsertTest extends TestCase {
|
||||
MySqlParameterizedOutputVisitor visitor = new MySqlParameterizedOutputVisitor(out);
|
||||
statemen.accept(visitor);
|
||||
|
||||
System.out.println(out.toString());
|
||||
// System.out.println(out.toString());
|
||||
|
||||
Assert.assertEquals(expect, out.toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user