Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the two different states of the mysql lock

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report