InnoDB Redo Log Format-physical log

Source: Internet
Author: User
modifying n bytes on a page can be considered a physical log. These include the following types: Mlog_write_string, Mlog_8bytes, Mlog_2bytes, Mlog_1bytes, Mlog_4bytes. Various page-linked table pointer modifications and file header, Segment page content modifications are recorded in these ways log. 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, mlog_log_string are written to 1, 2, 4; 8 bytes; The log write function of the string.

InnoDB Redo Log Format-physical log

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.