Often what is called a lock in MySQL is really a lock request which can be in a granted or pending state.
Lock levels:
- SQL layer:
- user level
- DB object level
- Storage engine layer
- others
The isolation level influences both which locks are taken and how long a time they are held.
MySQL Shell 8.0.2.0+
Python module: concurrency_book.generate
source world.sql