zhfeng commented on code in PR #17734: URL: https://github.com/apache/camel/pull/17734#discussion_r2040504348
########## components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java: ########## @@ -171,12 +171,12 @@ public Object doInPreparedStatement(PreparedStatement ps) throws SQLException { total += count; } exchange.getIn().setHeader(SqlConstants.SQL_UPDATE_COUNT, total); - if (manualCommit) { + if (manualCommit && !restoreAutoCommit) { Review Comment: IIRC >Commit or rollback should only be called if auto commit has not been set to false before. So it should check with `if (manualCommit && restoreAutoCommit)` ? -- 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. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org