Class: Innodb::Page::Blob
Constant Summary
Constants inherited
from Innodb::Page
PAGE_TYPE, PAGE_TYPE_BY_VALUE, UNDEFINED_PAGE_NUMBER
Instance Attribute Summary
Attributes inherited from Innodb::Page
#space
Instance Method Summary
collapse
#checksum_crc32, #checksum_crc32?, #checksum_innodb, #checksum_innodb?, #checksum_invalid?, #checksum_type, #checksum_valid?, #corrupt?, #cursor, #default_page_size?, #each_page_body_byte_as_uint8, #each_page_header_byte_as_uint8, #extent_descriptor?, #fil_header, #fil_trailer, handle, #in_doublewrite_buffer?, #initialize, #inspect, #inspect_header_fields, maybe_undefined, #misplaced?, #misplaced_offset?, #misplaced_space?, #name, page_type_by_value, parse, #pos_fil_header, #pos_fil_trailer, #pos_page_body, #pos_partial_page_header, register_specialization, #size, #size_fil_header, #size_fil_trailer, #size_page_body, #size_partial_page_header, specialization_for, specialization_for?, #torn?, undefined?
Constructor Details
This class inherits a constructor from Innodb::Page
Instance Method Details
#blob_data ⇒ Object
29
30
31
32
33
|
# File 'lib/innodb/page/blob.rb', line 29
def blob_data
cursor(pos_blob_data).name("blob_data") do |c|
c.read_bytes([:length])
end
end
|
20
21
22
23
24
25
26
27
|
# File 'lib/innodb/page/blob.rb', line 20
def
cursor().name("blob_header") do |c|
{
length: c.name("length") { c.read_uint32 },
next: c.name("next") { Innodb::Page.maybe_undefined(c.read_uint32) },
}
end
end
|
#dump ⇒ Object
Dump the contents of a page for debugging purposes.
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# File 'lib/innodb/page/blob.rb', line 64
def dump
super
puts "blob header:"
pp
puts
puts "blob data:"
HexFormat.puts(blob_data)
puts
puts
end
|
#each_region {|Region.new(
offset: pos_blob_header,
length: size_blob_header,
name: :blob_header,
info: "Blob Header"
)| ... } ⇒ Object
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# File 'lib/innodb/page/blob.rb', line 41
def each_region(&block)
return enum_for(:each_region) unless block_given?
super
yield Region.new(
offset: ,
length: ,
name: :blob_header,
info: "Blob Header"
)
yield Region.new(
offset: pos_blob_data,
length: [:length],
name: :blob_data,
info: "Blob Data"
)
nil
end
|
#next_blob_page ⇒ Object
35
36
37
38
39
|
# File 'lib/innodb/page/blob.rb', line 35
def next_blob_page
return unless [:next]
space.page([:next])
end
|
#pos_blob_data ⇒ Object
16
17
18
|
# File 'lib/innodb/page/blob.rb', line 16
def pos_blob_data
+
end
|
8
9
10
|
# File 'lib/innodb/page/blob.rb', line 8
def
pos_page_body
end
|
12
13
14
|
# File 'lib/innodb/page/blob.rb', line 12
def
4 + 4
end
|