[ 
https://issues.apache.org/jira/browse/IGNITE-21020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Pereslegin updated IGNITE-21020:
--------------------------------------
    Description: 
AI3 doesn't support transaction control statements for non autocommit mode.

For example:

{code:java}
connection.setAutoCommit(false);

execute("INSERT INTO TEST VALUES(0, 0);" // tx1 must be started
+ "COMMIT;"  // tx1 must be committed
+ "START TRANSACTION;"  // tx2 must be started
+ "INSERT INTO TEST VALUES(1, 1);");

execute("INSERT INTO TEST VALUES(2, 2);"); // must be done in tx2

connection.commit(); // tx2 must be committed (this is equal to 
execute("COMMIT;"))
{code}

This code currently throws an exception due to current implementation 
limitation.

p.s. additional notes about current limitation is described here 
https://github.com/apache/ignite-3/pull/2846#discussion_r1400388258

  was:
AI3 don't support transaction control statements for non autocommit mode.

For example:

{code:java}
connection.setAutoCommit(false);

execute("INSERT INTO TEST VALUES(0, 0);" // tx1 must be started
+ "COMMIT;"  // tx1 must be committed
+ "START TRANSACTION;"  // tx2 must be started
+ "INSERT INTO TEST VALUES(1, 1);");

execute("INSERT INTO TEST VALUES(2, 2);"); // must be done in tx2

connection.commit(); // tx2 must be committed (this is equal to 
execute("COMMIT;"))
{code}

This code currently throws an exception due to current implementation 
limitation.

p.s. additional notes about current limitation is described here 
https://github.com/apache/ignite-3/pull/2846#discussion_r1400388258


> JDBC. Support transaction control statements for non autocommit mode
> --------------------------------------------------------------------
>
>                 Key: IGNITE-21020
>                 URL: https://issues.apache.org/jira/browse/IGNITE-21020
>             Project: Ignite
>          Issue Type: Improvement
>          Components: jdbc, sql
>            Reporter: Pavel Pereslegin
>            Priority: Major
>              Labels: ignite-3, jdbc
>
> AI3 doesn't support transaction control statements for non autocommit mode.
> For example:
> {code:java}
> connection.setAutoCommit(false);
> execute("INSERT INTO TEST VALUES(0, 0);" // tx1 must be started
> + "COMMIT;"  // tx1 must be committed
> + "START TRANSACTION;"  // tx2 must be started
> + "INSERT INTO TEST VALUES(1, 1);");
> execute("INSERT INTO TEST VALUES(2, 2);"); // must be done in tx2
> connection.commit(); // tx2 must be committed (this is equal to 
> execute("COMMIT;"))
> {code}
> This code currently throws an exception due to current implementation 
> limitation.
> p.s. additional notes about current limitation is described here 
> https://github.com/apache/ignite-3/pull/2846#discussion_r1400388258



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to