Home > Back-end >  The 2020-12-14: mysql, repeatable read is how to achieve?
The 2020-12-14: mysql, repeatable read is how to achieve?

Time:12-15

The 2020-12-14: mysql, repeatable read is how to achieve? # # f greatly architects a daily topic

CodePudding user response:

Using MVCC (multi version concurrency control), InnoDB for every line records added a transaction ID, when modifying data, will write, when a transaction ID
At the beginning of the read transaction, the system will give the transaction a current version number (transaction ID), the transaction will read the version number & lt;=the current version number of the data, then even if another transaction inserting a data, and immediately submit, new insert the version number of the data will be higher than read transaction version number, so read transaction read data will not change,
  • Related