In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article editor for everyone to introduce in detail "what are the two types of undo log in mysql", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "what are the two types of undo log in mysql" can help you solve your doubts.
According to the behavior, undo log is divided into two types: insert undo log and update undo log
1. Insert undo log is generated in the insert operation. Records of insert operations are visible only to the transaction itself.
This record is not visible to other transactions, so the insert undo log can be deleted directly after the transaction is committed without the need for a purge operation.
2. Update undo log is generated in update or delete operation.
Because of the impact on existing records, in order to provide a MVCC mechanism, update undo log cannot delete a transaction when it commits, but puts it on the history list when the transaction commits, waiting for the purge thread to perform the final delete operation.
In order to better support concurrency, the multi-version consistent read of InnoDB is based on the rollback segment. In addition, for update and delete operations, InnoDB does not actually delete the original record, but sets the record's delete mark to 1. Therefore, in order to solve the problem of data Page and Undo Log expansion, it is necessary to introduce purge mechanism for recycling.
In order to ensure that there is no conflict when writing their respective undo log during the concurrent operation of transactions, InnoDB uses a rollback segment to maintain the concurrent writing and persistence of undo log. Rollback segment is actually a way of organizing Undo files.
After reading this, the article "what are the two types of undo log in mysql" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it. If you want to know more about the article, please 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.