dushaoshuai / dushaoshuai.github.io

https://www.shuai.host
0 stars 0 forks source link

MySQL :: Locking Reads #10

Open dushaoshuai opened 2 years ago

dushaoshuai commented 2 years ago

15.7.2.4 Locking Reads

If you query data and then insert or update related data within the same transaction, the regular SELECT statement does not give enough protection. Other transactions can update or delete the same rows you just queried. InnoDB supports two types of locking reads that offer extra safety: