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

Row lock of InnoDB transaction lock-locking in update phase of delete process

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. The introduction of delete process is divided into two stages: search and update. Lock the clustered index record during the search phase, refer to the previous article. In the update phase, the clustered index records will be tagged with delete, and then the secondary index records will be search. The secondary index records will be implicitly locked, that is, unlocked. Finally, the secondary index records will be tagged with delete.

Click (here) to collapse or open

Mysql_delete::

/ / rr_quick- >...-> row_search_for_mysql

While (! (error=info.read_record (& info)) & &! thd- > killed &! Thd- > is_error () {

...

/ /...-> row_update_for_mysql

Error= table- > file- > ha_delete_row (table- > record [0])

.} 2. Lock principle flow chart

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

Database

Wechat

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

12
Report