innodb_ruby 0.9.0 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,8 @@
1
+ module ReadBitsAtOffset
2
+ # Read a given number of bits from an integer at a specific bit offset. The
3
+ # value returned is 0-based so does not need further shifting or adjustment.
4
+ def read_bits_at_offset(data, bits, offset)
5
+ ((data & (((1 << bits) - 1) << offset)) >> offset)
6
+ end
7
+ end
8
+
@@ -1,5 +1,5 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
3
  module Innodb
4
- VERSION = "0.9.0"
4
+ VERSION = "0.9.5"
5
5
  end
@@ -62,6 +62,7 @@ class Innodb::Xdes
62
62
  start_page = page.offset + (extent_number * page.space.pages_per_extent)
63
63
  cursor.name("xdes[#{extent_number}]") do |c|
64
64
  {
65
+ :offset => c.position,
65
66
  :start_page => start_page,
66
67
  :end_page => start_page + page.space.pages_per_extent - 1,
67
68
  :fseg_id => c.name("fseg_id") { c.get_uint64 },
@@ -78,6 +79,7 @@ class Innodb::Xdes
78
79
  @xdes
79
80
  end
80
81
 
82
+ def offset; @xdes[:offset]; end
81
83
  def start_page; @xdes[:start_page]; end
82
84
  def end_page; @xdes[:end_page]; end
83
85
  def fseg_id; @xdes[:fseg_id]; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: innodb_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-02-19 00:00:00.000000000 Z
13
+ date: 2014-04-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bindata
@@ -41,17 +41,21 @@ files:
41
41
  - README.md
42
42
  - lib/innodb.rb
43
43
  - lib/innodb/checksum.rb
44
- - lib/innodb/cursor.rb
45
44
  - lib/innodb/data_dictionary.rb
46
45
  - lib/innodb/data_type.rb
47
46
  - lib/innodb/field.rb
48
47
  - lib/innodb/fseg_entry.rb
48
+ - lib/innodb/history.rb
49
+ - lib/innodb/history_list.rb
49
50
  - lib/innodb/index.rb
50
51
  - lib/innodb/inode.rb
51
52
  - lib/innodb/list.rb
53
+ - lib/innodb/lsn.rb
52
54
  - lib/innodb/log.rb
53
55
  - lib/innodb/log_block.rb
54
56
  - lib/innodb/log_group.rb
57
+ - lib/innodb/log_record.rb
58
+ - lib/innodb/log_reader.rb
55
59
  - lib/innodb/page.rb
56
60
  - lib/innodb/page/blob.rb
57
61
  - lib/innodb/page/fsp_hdr_xdes.rb
@@ -69,6 +73,9 @@ files:
69
73
  - lib/innodb/stats.rb
70
74
  - lib/innodb/system.rb
71
75
  - lib/innodb/undo_log.rb
76
+ - lib/innodb/undo_record.rb
77
+ - lib/innodb/util/buffer_cursor.rb
78
+ - lib/innodb/util/read_bits_at_offset.rb
72
79
  - lib/innodb/version.rb
73
80
  - lib/innodb/xdes.rb
74
81
  - bin/innodb_log