mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve sql parser
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package com.alibaba.druid.pool.oceanbase;
|
||||
|
||||
import java.sql.Connection;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
|
||||
public class OBTest extends TestCase {
|
||||
|
||||
private DruidDataSource dataSource;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
dataSource = new DruidDataSource();
|
||||
dataSource.setUrl("jdbc:mysql://10.232.36.171:45447/");
|
||||
dataSource.setUsername("admin");
|
||||
dataSource.setPassword("admin");
|
||||
dataSource.setFilters("log4j");
|
||||
}
|
||||
|
||||
public void test_connect() throws Exception {
|
||||
{
|
||||
Connection conn = dataSource.getConnection();
|
||||
|
||||
conn.setAutoCommit(false);
|
||||
|
||||
conn.close();
|
||||
}
|
||||
{
|
||||
Connection conn = dataSource.getConnection();
|
||||
|
||||
conn.setAutoCommit(true);
|
||||
|
||||
conn.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user