A transaction is divided into 4 levels:
1.read Uncommitted ( unread): Cannot avoid dirty reads, non-repeatable reads, virtual reads (phantom reads)
2.read committed ( read-committed ): can avoid dirty reading
3.repeatable committed ( repeatable read): Avoid dirty reads, non-repeatable reads
4.serializable ( serialized): Avoid dirty reads, non-repeatable reads, false reads
Dirty reading refers to the fact that transaction a reads data that is not committed by transaction B
Non-repeatable reading refers to reading the same data, 2 times the result is not the same (focus on modifying the data)
Virtual reading refers to the fact that after transaction a reads some data, transaction B deletes some data, and when transaction a re-reads the data, it finds that some data disappears. Or when transaction a reads some data, transaction B inserts some data, and when transaction a re-reads the data, it finds some inexplicable data.
MySQL transaction level (ii)