MySQL Transaction ISOLATION LEVEL

Source: Internet
Author: User

I. 4 types of TRANSACTION isolation levels

1. READ UNCOMMITTED

2. Read Committed

3. Repeatable READ

4. Serializable

Two. 3 Types of problems

1. Dirty Reading

One transaction reads uncommitted data to another transaction (update and insert)

Features: Inconsistent content or number of lines

2. Non-repeatable reading

One transaction reads the submitted update to another transaction

Features: Inconsistent content before and after

3. Virtual Reading

One transaction reads a committed insert into another transaction

Features: Inconsistent number of front and rear lines

Three. Relationship between 4 transaction isolation levels and 3 types of issues

Four. mysql Operations on transactions

1. View the current transaction isolation level

SELECT @ @tx_isolation;

2. Modify the Transaction Isolation level

Set tx_isolation = ' read-committed ';

3. mysql Default transaction ISOLATION level

Repeatable-read

Related blog: https://www.cnblogs.com/huanongying/p/7021555.html

MySQL Transaction ISOLATION LEVEL

Related Article

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.