fix url prefix jdbc:oceanbase:oracle recognize error

Signed-off-by: hongwei yi hongweiyi@hotmail.com
workaround: if you need use oceanbase oracle type in Druid previous version, please use DruidDataSource.setDbType("oceanbase_oracle") instead
This commit is contained in:
hongweiyi
2020-10-10 17:18:43 +08:00
parent c06fd07aa7
commit c77c8e731f
2 changed files with 7 additions and 2 deletions
@@ -30,6 +30,11 @@ public class JdbcUtils_driver extends TestCase {
Assert.assertEquals(JdbcConstants.ODPS, JdbcUtils.getDbTypeRaw(url, className));
}
public void test_oceanbase() {
assertEquals(JdbcConstants.OCEANBASE, DbType.of(JdbcUtils.getDbType("jdbc:oceanbase://127.1:3306/test?a=b", null)));
assertEquals(JdbcConstants.OCEANBASE_ORACLE, DbType.of(JdbcUtils.getDbType("jdbc:oceanbase:oracle://127.1:3306/test?a=b", null)));
}
public void test_log4jdbc_mysql() {
String jdbcUrl = "jdbc:log4jdbc:mysql://localhost:8066/test";
DbType dbType = JdbcUtils.getDbTypeRaw(jdbcUrl, null);