Understanding MySQL SELECT ... FOR UPDATE Locking: Row vs. Table Locks
This article explains how MySQL's SELECT ... FOR UPDATE statement acquires either row-level or table-level locks depending on the presence of indexes or primary keys, and demonstrates the behavior with multiple transaction examples and a sample table definition.