1, read UNCOMMITTED (row lock)
Dirty reads occur, things are not committed and are seen by other things, and uncommitted data is dirty data.
2. Read committed (Row lock)
A non-repeatable read occurs, and when things start, only the things that have been submitted are modified.
3, repeat read (row lock)
This level guarantees that the results of the same records that were read more than once in the same transaction are consistent, but cannot resolve the phantom read behavior.
4. Serialization (table Lock)
Table lock level, read will also block. Only the previous thing is done to carry out the next thing.
The non-repeatable read and Phantom reads are:
Non-repeatable reads are uodate and delete, while Phantom reads are heavy on insert.
MySQL at level 3 does not solve the phenomenon of phantom reading, is due to the adoption of a next-key lock.
Three kinds of locks: clearance lock, record lock, Next-key.
Next-key is the blending mode of the former two. Locks the target index record and a range of rows.
MySQL things isolated