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