nizhikov commented on code in PR #11528: URL: https://github.com/apache/ignite/pull/11528#discussion_r1795569644
########## modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRequestHandler.java: ########## @@ -746,8 +781,80 @@ else if (X.cause(e, IgniteSQLException.class) != null) { } } + /** + * Invokes {@code qry} inside a transaction with id equals to {@code txId}. + */ + private List<FieldsQueryCursor<List<?>>> invokeInTransaction( + int txId, + boolean autoCommit, + SqlFieldsQueryEx qry, + GridQueryCancel cancel + ) throws IgniteCheckedException { + ClientTxContext txCtx = connCtx.txContext(txId); + + if (txCtx == null) + throw new IgniteException("Transaction not found [txId=" + txId + ']'); + + boolean err = false; + + try { + txCtx.acquire(true); + + return invokeOutsideTransaction(qry, cancel); + } + catch (Exception e) { + err = true; + + if (autoCommit) Review Comment: Good catch. Fixed. -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org