Isolation levels supported in MySQL mode
OceanBase Database supports two isolation levels in MySQL mode:
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.
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
Limits
The repeatable read isolation level supported by OceanBase Database in MySQL mode can prevent more exceptions than MySQL Database.