Isolation levels supported in MySQL mode
The MySQL mode of OceanBase Database supports the following isolation levels:
Read committed: A query executed by a transaction can read only the data committed before the query starts. This isolation level cannot prevent non-repeatable or phantom reads. It is simple, efficient, and suitable for applications with few conflicting transactions.
Repeatable read: The same data read at different times within a transaction is consistent. This isolation level cannot prevent phantom reads.
Serializable: It is similar to the serializable isolation level in Oracle Database but is not strictly a serializable isolation level.
By default, OceanBase Database uses the read committed isolation level.
Isolation level settings
You can set the isolation level to the global level or the session level.
SET [GLOBAL | SESSION] TRANSACTION ISOLATION LEVEL REPEATABLE READ
Limitations
The repeatable read isolation level supported by the MySQL mode of OceanBase Database can prevent more exceptions than MySQL Database.