Get the App
SLTechnology News&Howtos  ›  Development  › 

Four locking ranges of InnoDB in mysql

Shulou Source: shulou.com Published: 2022-06-03 11:45:28 10月03日 Update

This article mainly introduces "four locking ranges of InnoDB in mysql". In daily operation, I believe that many people have doubts about the four locking ranges of InnoDB in mysql. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the questions of "four locking ranges of InnoDB in mysql". Next, please follow the editor to study!

1. Record lock, locking the record in the index.

2. Clearance lock.

Either lock the value in the middle of the index record, lock the value in front of the first index record, or lock the value behind the last index record.

3. the key lock is the combination of the record lock on the index record and the gap lock before the index record.

4. Insert the intention lock and add the lock of the record id in the insert operation.

Example

-- id is listed as a primary key column or a unique index column UPDATE SET age = 50 WHERE id = 1; at this point, the study on "four locking ranges of InnoDB in mysql" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Index scope learning or more gap help practical next examples intentions articles methods theory knowledge articles websites materials follow questions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Xiaomi Shulou Information Huawei Linux