korlov42 commented on code in PR #2965:
URL: https://github.com/apache/ignite-3/pull/2965#discussion_r1434125715


##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItSqlMultiStatementTxTest.java:
##########
@@ -230,22 +230,18 @@ void dmlScriptRollsBackImplicitly() throws 
InterruptedException {
 
     @Test
     void openedScriptTransactionRollsBackOnError() {
-        {
-            AsyncSqlCursor<InternalSqlRow> cursor = runScript(
-                    "START TRANSACTION READ WRITE;"
-                    + "INSERT INTO test VALUES(2);"
-                    + "INSERT INTO test VALUES(2/0);"
-                    + "SELECT 1;"
-                    + "COMMIT;"
-            );
+        String script = "START TRANSACTION READ WRITE;"
+                + "INSERT INTO test VALUES(2);"
+                + "INSERT INTO test VALUES(2/0);"

Review Comment:
   > what is the expected behavior if SELECT will raise an error?
   
   as far as I see, it depends... If exception is raised during cursor 
preparation, then an entire script will be interrupted. But now, data fetch is 
not part of the cursor preparation for SELECT statement, thus, script won't be 
interrupted, if it works in autoCommit=true mode



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to