Class: Innodb::FsegEntry
- Inherits:
-
Object
- Object
- Innodb::FsegEntry
- Defined in:
- lib/innodb/fseg_entry.rb
Overview
An InnoDB file segment entry, which appears in a few places, such as the FSEG header of INDEX pages, and in the TRX_SYS pages.
Constant Summary collapse
- SIZE =
The size (in bytes) of an FSEG entry, which contains a two 32-bit integers and a 16-bit integer.
4 + 4 + 2
Class Method Summary collapse
-
.get_entry_address(cursor) ⇒ Object
Return the FSEG entry address, which points to an entry on an INODE page.
-
.get_inode(space, cursor) ⇒ Object
Return an INODE entry which represents this file segment.
Class Method Details
.get_entry_address(cursor) ⇒ Object
Return the FSEG entry address, which points to an entry on an INODE page.
9 10 11 12 13 14 15 |
# File 'lib/innodb/fseg_entry.rb', line 9 def self.get_entry_address(cursor) { :space_id => cursor.get_uint32, :page_number => cursor.get_uint32, :offset => cursor.get_uint16, } end |
.get_inode(space, cursor) ⇒ Object
Return an INODE entry which represents this file segment.
18 19 20 21 22 23 24 |
# File 'lib/innodb/fseg_entry.rb', line 18 def self.get_inode(space, cursor) address = get_entry_address(cursor) page = space.page(address[:page_number]) if page.type == :INODE page.inode_at(address[:offset]) end end |