zhfeng commented on code in PR #17734: URL: https://github.com/apache/camel/pull/17734#discussion_r2040609802
########## 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: I think it should be `true` if `sql` is using in a `transacted()` like ```java from("direct:foo") .transacted() .to("sql:INSERT INTO ..."); ``` -- 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