What are the two different states of the mysql lock
In this article, the editor introduces in detail "what are the two different states of mysql locks". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "what are the two different states of mysql locks" can help you solve your doubts.
Status lock description
1. It includes intention sharing lock and intention exclusive lock, which are divided into the core logic of state lock.
2. Both locks describe whether a table lock can be added to a table.
When a transaction attempts to lock the entire table (shared lock or row lock), it first needs to obtain the corresponding type of intention lock (intention shared lock or intention shared lock)
Intention shared lock
When a transaction attempts to add a shared lock to the entire table, you first need to obtain the intended shared lock for the table.
Intention exclusive lock
Before a transaction attempts to lock the entire table, you first need to get the intention lock of the table.
The function of state lock
The method of innodb locking is based on index, and the locking granularity is row lock. The existence of intention lock is to coordinate the relationship between row lock and table lock and to support the coexistence of multi-granularity (table lock and row lock).
After reading this, the article "what are the two different states of mysql locks" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.