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

InnoDB redo log format-physical log

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Modifying N bytes on the page can be regarded as a physical log. It includes the following types: MLOG_WRITE_STRING, MLOG_8BYTES, MLOG_2BYTES, MLOG_1BYTES, MLOG_4BYTES. All kinds of page list pointer modifications and file headers and segment page content changes are logged in these ways. The specific format is as follows:

1 、 MLOG_2BYTES 、 MLOG_1BYTES 、 MLOG_4BYTES:

2 、 MLOG_8BYTES

3 、 MLOG_WRITE_STRING

4. Variable length byte algorithm mach_write_compressed:

If (n < 0x80UL) {mach_write_to_1 (b, n); return (1);} else if (n < 0x4000UL) {mach_write_to_2 (b, n | 0x8000UL); return (2);} else if (n < 0x200000UL) {mach_write_to_3 (b, n | 0xC00000UL); return (3) } else if (n < 0x10000000UL) {mach_write_to_4 (b, n | 0xE0000000UL); return (4);} else {mach_write_to_1 (b, 0xF0UL); mach_write_to_4 (b + 1, n); return (5);}

5. Mlog_write_ulint, mlog_write_ull, and mlog_log_string are the log writing functions for writing 1, 2, and 4-byte strings, respectively.

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