tonnixu opened a new issue #2061: proxy can't support multiple transaction URL: https://github.com/apache/incubator-shardingsphere/issues/2061 ## Bug Report **For English only**, other languages will not accept. Before report a bug, make sure you have: - Searched open and closed [GitHub issues](https://github.com/sharding-sphere/sharding-sphere/issues). - Read documentation: [ShardingSphere Doc](http://shardingsphere.io/document/current/en/overview/). Please pay attention on issues you submitted, because we maybe need more details. If no response **more than 7 days** and we cannot reproduce it on current information, we will **close it**. Please answer these questions before submitting your issue. Thanks! ### Which version of ShardingSphere did you use? 3.1.0 ### Which project did you use? Sharding-JDBC or Sharding-Proxy? Sharding-Proxy ### Expected behavior ` Connection con = getConnection1(); con.setAutoCommit(false); Statement statement = con.createStatement(); String orderNo = System.currentTimeMillis() + "A"; String sql = "insert into t_order(order_no,merc_no,merch_order_no,tx_dt,tx_tm,tx_amt) values('" + orderNo + "', 'B123456789012345', '" + orderNo + "', '20181117', '161411', '123.33')"; statement.executeUpdate(sql); con.rollback(); orderNo = System.currentTimeMillis() + "B"; sql = "insert into t_order(order_no,merc_no,merch_order_no,tx_dt,tx_tm,tx_amt) values('" + orderNo + "', 'B123456789012345', '" + orderNo + "', '20181117', '161411', '123.33')"; statement.executeUpdate(sql); orderNo = System.currentTimeMillis() + "C"; sql = "insert into t_order(order_no,merc_no,merch_order_no,tx_dt,tx_tm,tx_amt) values('" + orderNo + "', 'B123456789012345', '" + orderNo + "', '20181117', '161411', '123.33')"; statement.executeUpdate(sql); **con.commit();** ResultSet rs = statement.executeQuery("select * from t_order where order_no ='" + orderNo + "'"); while( rs.next() ) { System.out.println("order_no:" + rs.getString("order_no")); } // con.commit(); // sql = "insert into t_order(order_no,merc_no,merch_order_no,tx_dt,tx_tm,tx_amt) values('526431086763446276', 'B123456789012345', '526431083269591046', '20181117', '161411', '123.33')"; // statement.executeUpdate(sql); con.rollback(); con.close(); ` ### Actual behavior ` ACTIONS: You can try one of the following: 1. Make sure you started a transaction for the thread. 2. Make sure you didn't terminate it yet. 3. Increase the transaction timeout to avoid automatic rollback of long transactions; check http://www.atomikos.com/Documentation/JtaProperties for how to do this. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2819) at com.mysql.jdbc.ConnectionImpl.commit(ConnectionImpl.java:1739) at com.alibaba.druid.pool.DruidPooledConnection.commit(DruidPooledConnection.java:752) at TestMySql.main(TestMySql.java:32) ` ### Reason analyze (If you can) ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. ### Example codes for reproduce this issue (such as a github link).
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
