Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
junwen12221 committed Sep 29, 2021
1 parent 399ed79 commit ffd5243
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/io/mycat/backend/jdbc/JDBCConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,11 @@ public boolean setResponseHandler(ResponseHandler commandHandler) {
@Override
public void commit() {
try {
con.commit();

if (con.getAutoCommit()) {
LOGGER.warn("when jdbc con is autocommit call commit");
} else {
con.commit();
}
this.respHandler.okResponse(OkPacket.OK, this);
} catch (SQLException e) {
throw new RuntimeException(e);
Expand Down

0 comments on commit ffd5243

Please sign in to comment.