Closed yaozhu closed 10 months ago
@yaozhu This is a documented behavior of Drill. You are welcome to submit a PR to modify Drill to allow multiple queries in the JDBC driver.
You can run as many queries as you like on a single connection (sequentially) but please complete the execution of each query by scrolling through its ResultSet cursor before starting another one.
Before submitting a bug report, please verify that you are using the most current version of Drill.
Drill jdbc execute more than one sqls in same connection ,drill report exception msg in drill.log with info level
reproduce stop follow this: //mysql datasource //create table t1 (a int, b varchar(100), c varchar(100)) //insert into t1 values( 1, 'aaa','bbbb'); String sql = "select * from t1 limit 1"; try { Statement stmt = conn.createStatement(); for (int i = 0 ; i < 4 ; ++i) { stmt.executeQuery(sql); } System.out.println("DONE!");
} catch (SQLException e) { e.printStackTrace(); }finally { conn.close(); }