Class: Innodb::Page::SysDataDictionaryHeader
- Inherits:
-
Innodb::Page
- Object
- Innodb::Page
- Innodb::Page::SysDataDictionaryHeader
- Defined in:
- lib/innodb/page/sys_data_dictionary_header.rb
Constant Summary
Constants inherited from Innodb::Page
PAGE_TYPE, PAGE_TYPE_BY_VALUE, SPECIALIZED_CLASSES
Instance Attribute Summary
Attributes inherited from Innodb::Page
Instance Method Summary collapse
-
#data_dictionary_header ⇒ Object
Parse the data dictionary header from the page.
- #dump ⇒ Object
- #each_region {|{ :offset => pos_data_dictionary_header, :length => size_data_dictionary_header, :name => :data_dictionary_header, :info => "Data Dictionary Header", }| ... } ⇒ Object
-
#pos_data_dictionary_header ⇒ Object
The position of the data dictionary header within the page.
-
#size_data_dictionary_header ⇒ Object
The size of the data dictionary header.
Methods inherited from Innodb::Page
#calculate_checksum, #checksum, #corrupt?, #cursor, #fil_header, handle, #initialize, #inspect, #lsn, maybe_undefined, #name, #next, #offset, parse, #pos_fil_header, #pos_fil_trailer, #pos_page_body, #prev, #size, #size_fil_header, #size_fil_trailer, #type
Constructor Details
This class inherits a constructor from Innodb::Page
Instance Method Details
#data_dictionary_header ⇒ Object
Parse the data dictionary header from the page.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/innodb/page/sys_data_dictionary_header.rb', line 15 def data_dictionary_header cursor(pos_data_dictionary_header).name("data_dictionary_header") do |c| { :max_row_id => c.name("max_row_id") { c.get_uint64 }, :max_table_id => c.name("max_table_id") { c.get_uint64 }, :max_index_id => c.name("max_index_id") { c.get_uint64 }, :max_space_id => c.name("max_space_id") { c.get_uint32 }, :unused_mix_id_low => c.name("unused_mix_id_low") { c.get_uint32 }, :indexes => c.name("indexes") {{ :SYS_TABLES => c.name("SYS_TABLES") {{ :PRIMARY => c.name("PRIMARY") { c.get_uint32 }, :ID => c.name("ID") { c.get_uint32 }, }}, :SYS_COLUMNS => c.name("SYS_COLUMNS") {{ :PRIMARY => c.name("PRIMARY") { c.get_uint32 }, }}, :SYS_INDEXES => c.name("SYS_INDEXES") {{ :PRIMARY => c.name("PRIMARY") { c.get_uint32 }, }}, :SYS_FIELDS => c.name("SYS_FIELDS") {{ :PRIMARY => c.name("PRIMARY") { c.get_uint32 }, }} }}, :unused_space => c.name("unused_space") { c.get_bytes(4) }, :fseg => c.name("fseg") { Innodb::FsegEntry.get_inode(@space, c) }, } end end |
#dump ⇒ Object
63 64 65 66 67 68 69 |
# File 'lib/innodb/page/sys_data_dictionary_header.rb', line 63 def dump super puts puts "data_dictionary header:" pp data_dictionary_header end |
#each_region {|{ :offset => pos_data_dictionary_header, :length => size_data_dictionary_header, :name => :data_dictionary_header, :info => "Data Dictionary Header", }| ... } ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/innodb/page/sys_data_dictionary_header.rb', line 44 def each_region unless block_given? return enum_for(:each_region) end super do |region| yield region end yield({ :offset => pos_data_dictionary_header, :length => size_data_dictionary_header, :name => :data_dictionary_header, :info => "Data Dictionary Header", }) nil end |
#pos_data_dictionary_header ⇒ Object
The position of the data dictionary header within the page.
5 6 7 |
# File 'lib/innodb/page/sys_data_dictionary_header.rb', line 5 def pos_data_dictionary_header pos_fil_header + size_fil_header end |