Issue while using transactions in sql apache ignite console grid gain

classic Classic list List threaded Threaded
6 messages Options
harinath harinath
Reply | Threaded
Open this post in threaded view
|

Issue while using transactions in sql apache ignite console grid gain

Hi,

I was trying to use Transactions in Console Grid. The following is my
statement.

BEGIN;
INSERT INTO TempTable (id, name, LastName, age) VALUES (997, 'Avhy',
'Ghale', 32);
COMMIT;

While trying to execute the query i was encountering the following error
Error: Unsupported DDL/DML operation: org.h2.command.dml.TransactionCommand
Can you please help me to understand the issue.

Thanks,
Harinath



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
akurbanov akurbanov
Reply | Threaded
Open this post in threaded view
|

Re: Issue while using transactions in sql apache ignite console grid gain

Hello, what do you use to execute there queries?

Could you please try using JDBC and check if it is working there.

Also, please share the cache configuration, do you use
TRANSACTIONAL_SNAPSHOT?
https://apacheignite.readme.io/docs/multiversion-concurrency-control





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
harinath harinath
Reply | Threaded
Open this post in threaded view
|

Re: Issue while using transactions in sql apache ignite console grid gain

Hi,

Thanks for the response.
We are running this queries on Ignite Console Grid Gain. Plan is to use
native driver with thick client

Yes the table is created with Atomicity as TRANSACTIONAL_SNAPSHOT
CREATE TABLE TempTable (
    ID int,
    Name varchar(255),
    LastName varchar(255),
    Age int,
    PRIMARY KEY (ID)
) WITH "ATOMICITY=TRANSACTIONAL_SNAPSHOT".

Please find the cache configuration shared.

Thanks,
Harinath



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
harinath harinath
Reply | Threaded
Open this post in threaded view
|

Re: Issue while using transactions in sql apache ignite console grid gain

akurbanov akurbanov
Reply | Threaded
Open this post in threaded view
|

Re: Issue while using transactions in sql apache ignite console grid gain

Hello,

Can confirm that this is not working because multistatement execution is not
yet supported by the console/visor.

I've tested your case a little with JDBC and it works just fine for the
statements you have shared with snippet like this:

        try (Connection conn =
DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1/")) {
            try (Statement stmt = conn.createStatement()) {
                stmt.execute("BEGIN;");

                stmt.execute("INSERT INTO TempTable (id, name, LastName,
age) VALUES (1111, 'Avhy',\n" +
                        "'Ghale', 32);");

                stmt.execute("ROLLBACK;");
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }

Best regards,
Anton



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
harinath harinath
Reply | Threaded
Open this post in threaded view
|

Re: Issue while using transactions in sql apache ignite console grid gain

Hi,

Thank you for the confirmation.

Thanks,
Harinath



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/