Class: Innodb::Page::IbufBitmap

Inherits:
Innodb::Page show all
Extended by:
ReadBitsAtOffset
Defined in:
lib/innodb/page/ibuf_bitmap.rb

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

Methods included from ReadBitsAtOffset

read_bits_at_offset

Methods inherited from Innodb::Page

#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

#dumpObject



37
38
39
40
41
42
43
44
# File 'lib/innodb/page/ibuf_bitmap.rb', line 37

def dump
  super

  puts "ibuf bitmap:"
  ibuf_bitmap.each_page_status do |page_number, page_status|
    puts "  Page %i: %s" % [page_number, page_status.inspect]
  end
end

#each_region {|Region.new( offset: pos_ibuf_bitmap, length: size_ibuf_bitmap, name: :ibuf_bitmap, info: "Insert Buffer Bitmap" )| ... } ⇒ Object

Yields:



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/innodb/page/ibuf_bitmap.rb', line 22

def each_region(&block)
  return enum_for(:each_region) unless block_given?

  super

  yield Region.new(
    offset: pos_ibuf_bitmap,
    length: size_ibuf_bitmap,
    name: :ibuf_bitmap,
    info: "Insert Buffer Bitmap"
  )

  nil
end

#ibuf_bitmapObject



18
19
20
# File 'lib/innodb/page/ibuf_bitmap.rb', line 18

def ibuf_bitmap
  Innodb::IbufBitmap.new(self, cursor(pos_ibuf_bitmap))
end

#pos_ibuf_bitmapObject



10
11
12
# File 'lib/innodb/page/ibuf_bitmap.rb', line 10

def pos_ibuf_bitmap
  pos_page_body
end

#size_ibuf_bitmapObject



14
15
16
# File 'lib/innodb/page/ibuf_bitmap.rb', line 14

def size_ibuf_bitmap
  (Innodb::IbufBitmap::BITS_PER_PAGE * space.pages_per_bookkeeping_page) / 8
end