22.2.1.1 Fil Header

The Fil Header has eight parts, as follows:

Name

Size

Remarks

FIL_PAGE_SPACE

4

4 ID of the space the page is in

FIL_PAGE_OFFSET

4

ordinal page number from start of space

FIL_PAGE_PREV

4

offset of previous page in key order

FIL_PAGE_NEXT

4

offset of next page in key order

FIL_PAGE_LSN

8

log serial number of page's latest log record

FIL_PAGE_TYPE

2

current defined types are: FIL_PAGE_INDEX, FIL_PAGE_UNDO_LOG, FIL_PAGE_INODE, FIL_PAGE_IBUF_FREE_LIST

FIL_PAGE_FILE_FLUSH_LSN

8

"the file has been flushed to disk at least up to this lsn" (log serial number), valid only on the first page of the file

FIL_PAGE_ARCH_LOG_NO

4

the latest archived log file number at the time that FIL_PAGE_FILE_FLUSH_LSN was written (in the log)

  • FIL_PAGE_SPACE is a necessary identifier because different pages might belong to different (table) spaces within the same file. The word "space" is generic jargon for either "log" or "tablespace".

  • FIL_PAGE_PREV and FIL_PAGE_NEXT are the page's "backward" and "forward" pointers. To show what they're about, I'll draw a two-level B-tree.

--------
  - root -
  --------
       |
  ----------------------
  |                    |
  |                    |
  --------          --------
  - leaf -  <-->    - leaf -
  --------          --------

Everyone has seen a B-tree and knows that the entries in the root page point to the leaf pages. (I indicate those pointers with vertical '|' bars in the drawing.) But sometimes people miss the detail that leaf pages can also point to each other (I indicate those pointers with a horizontal two-way pointer '<-->' in the drawing). This feature allows InnoDB to navigate from leaf to leaf without having to back up to the root level. This is a sophistication which you won't find in the classic B-tree, which is why InnoDB should perhaps be called a B+-tree instead.

  • The fields FIL_PAGE_FILE_FLUSH_LSN, FIL_PAGE_PREV, and FIL_PAGE_NEXT all have to do with logs, so I'll refer you to my article How Logs Work With MySQL And InnoDB on devarticles.com.

  • FIL_PAGE_FILE_FLUSH_LSN and FIL_PAGE_ARCH_LOG_NO are valid only for the first page of a data file.


User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.