
If autocommit is enabled, the SELECT is its own transaction. It therefore is
known to be read only and can be serialized if performed as a consistent
(non-locking) read and need not block for other transactions. (This means that
to force a plain SELECT to block if other transactions have modified the
selected rows, you should disable autocommit.)

Distributed XA transactions should always use this isolation level.

Access Mode
-----------

The access mode specifies whether the transaction is allowed to write data or
not. By default, transactions are in READ WRITE mode (see the tx_read_only
system variable). READ ONLY mode allows the storage engine to apply
optimizations that cannot be used for transactions which write data. The only
exception to this rule is that read only transactions can perform DDL
statements on temporary tables.

It is not permitted to specify both READ WRITE and READ ONLY in the same
statement.

READ WRITE and READ ONLY can also be specified in the START TRANSACTION
statement, in which case the specified mode is only valid for one transaction.

Examples
--------

SET GLOBAL TRANSACTION ISOLATION LEVEL SERIALIZABLE;

Attempting to set the isolation level within an existing transaction without
specifying GLOBAL or SESSION.

START TRANSACTION;

SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
ERROR 1568 (25001): Transaction characteristics can't be changed while a
transaction is in progress

URL: https://mariadb.com/kb/en/set-transaction/