Transactions
Learn about transactions in MariaDB Server. This section covers SQL statements for managing atomic operations (START TRANSACTION, COMMIT, ROLLBACK), ensuring data integrity and consistency.
Last updated
Was this helpful?
Learn about transactions in MariaDB Server. This section covers SQL statements for managing atomic operations (START TRANSACTION, COMMIT, ROLLBACK), ensuring data integrity and consistency.
Commit the current transaction. This statement permanently saves all changes made during the current transaction to the database.
Complete LOCK TABLES reference: READ/WRITE/WRITE CONCURRENT lock syntax, table aliases, WAIT n|NOWAIT timeouts, UNLOCK TABLES, and innodb_table_locks behavior.
Understand how MariaDB manages concurrency. Metadata locks protect the structure of database objects from being modified while they are in use.
Set the transaction isolation level to READ COMMITTED. In this mode, each query within a transaction sees only data committed before the query began.
Set the transaction isolation level to READ UNCOMMITTED. This lowest isolation level allows dirty reads, where a transaction can see uncommitted changes.
Set the transaction isolation level to REPEATABLE READ. This default InnoDB level ensures consistent results for repeated reads within the same transaction.
Undo changes in the current transaction. This statement reverts the database to its state before the transaction started or to a specific savepoint.
Create a named marker within a transaction. Savepoints allow you to roll back part of a transaction without canceling the entire operation.
Set the transaction isolation level to SERIALIZABLE. This highest level ensures total isolation by converting plain SELECTs to locking reads.
Identify statements that force a commit. Certain commands, like DDL statements, implicitly commit the current transaction before executing.
Complete START TRANSACTION reference: BEGIN/COMMIT/ROLLBACK syntax, WITH CONSISTENT SNAPSHOT option, READ ONLY/WRITE modes, AND [NO] CHAIN/RELEASE modifiers.
Understand how timeouts affect transactions. This section explains system variables that control wait times for locks and transaction duration.
Release explicit table locks. This statement releases all locks acquired by the current session with LOCK TABLES.
Control lock wait behavior. These clauses allow statements to wait for a specific timeout or fail immediately if a lock cannot be acquired.
Manage distributed transactions. This section covers XA statements for coordinating two-phase commits across multiple resources.
Last updated
Was this helpful?
Was this helpful?

