Shared & Exclusive Locks
Learn Shared & Exclusive Locks (Locks & Concurrency, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Introduction InnoDB has two basic row lock modes. A shared (S) lock lets a transaction read a row and allows other readers to share it; an exclusive (X) lock lets a transaction change or delete a row and blocks every other S or X request on that row. Plain SELECT takes no lock at all (it reads a snapshot).