MySQL things isolated

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.