For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Transactions

SQL transaction control in GridGain 9 using START TRANSACTION and COMMIT, including read-only and read-write modes.

A transaction is a sequence of SQL operations that starts with the START TRANSACTION statement and ends with the COMMIT statement. Either the effect of all operations will be published, or no results will be published at all.

In GridGain 9, you start the transaction by using the START TRANSACTION statement:

START TRANSACTION [ READ ONLY | READ WRITE ]

DDL statements are not supported inside transactions.

Parameters:

  • READ WRITE - both read and write operations are allowed in the transaction. Used by default.

  • READ ONLY - only read operations are allowed in the transaction.

You close and commit the transaction by using the COMMIT statement:

COMMIT

Example

The example below inserts 3 lines into the table in a single transaction, ensuring they will all be committed together:

START TRANSACTION READ WRITE;

INSERT INTO Person (id, name, surname) VALUES (1, 'John', 'Smith');
INSERT INTO Person (id, name, surname) VALUES (2, 'Jane', 'Smith');
INSERT INTO Person (id, name, surname) VALUES (3, 'Adam', 'Mason');

COMMIT;

This page is: Copyright © 2026 MariaDB. All rights reserved.

Last updated

Was this helpful?