| Class | Innodb::Xdes |
| In: |
lib/innodb/xdes.rb
|
| Parent: | Object |
An InnoDB "extent descriptor entry" or "XDES". These structures are used in the XDES entry array contained in FSP_HDR and XDES pages.
Note the distinction between XDES entries and XDES pages.
| BITS_PER_PAGE | = | 2 |
Number of bits per page in the XDES entry bitmap field. Currently XDES entries
store two bits per page, with the following meanings:
|
|
| BITMAP_BV_FREE | = | 1 | The bit value for a free page. | |
| BITMAP_BV_CLEAN | = | 2 | The bit value for a clean page (currently unused in InnoDB). | |
| BITMAP_BV_ALL | = | (BITMAP_BV_FREE | BITMAP_BV_CLEAN) | The bitwise-OR of all bitmap bit values. | |
| STATES | = | { 1 => :free, # The extent is completely empty and unused, and should # be present on the filespace's FREE list. 2 => :free_frag, # Some pages of the extent are used individually, and # the extent should be present on the filespace's # FREE_FRAG list. 3 => :full_frag, # All pages of the extent are used individually, and # the extent should be present on the filespace's # FULL_FRAG list. 4 => :fseg, # The extent is wholly allocated to a file segment. # Additional information about the state of this extent # can be derived from the its presence on particular # file segment lists (FULL, NOT_FULL, or FREE). } | The values used in the +:state+ field indicating what the extent is used for (or what list it is on). |
Return whether this XDES entry is allocated to an fseg (the whole extent then belongs to the fseg).
Iterate through all pages represented by this extent descriptor, yielding a page status hash for each page, containing the following fields:
:page The page number.
:free Boolean indicating whether the page is free.
:clean Boolean indicating whether the page is clean (currently
this bit is unused by InnoDB, and always set true).
Return the address of the next list pointer from the list node contained within the XDES entry. This is used by +Innodb::List::Xdes+ to iterate through XDES entries in a list.
Return the status for a given page. This is relatively inefficient as implemented and could be done better.
Return the address of the previous list pointer from the list node contained within the XDES entry. This is used by +Innodb::List::Xdes+ to iterate through XDES entries in a list.