re_len-support (never try to get re_len if it is not a Queue)
This commit is contained in:
parent
3c2ee96d63
commit
5796cebdc8
|
@ -53,12 +53,8 @@ module SBDB
|
||||||
#type = BTREE if type == UNKNOWN and (flags & CREATE) == CREATE
|
#type = BTREE if type == UNKNOWN and (flags & CREATE) == CREATE
|
||||||
@home, @db = opts[:env], opts[:env] ? opts[:env].bdb_object.db : Bdb::Db.new
|
@home, @db = opts[:env], opts[:env] ? opts[:env].bdb_object.db : Bdb::Db.new
|
||||||
opts[:type] = TYPES.index(self.class) || UNKNOWN
|
opts[:type] = TYPES.index(self.class) || UNKNOWN
|
||||||
info self: self, opts: opts
|
|
||||||
info 're_len before' => @db.re_len
|
|
||||||
@db.re_len = opts[:re_len] if opts[:re_len]
|
@db.re_len = opts[:re_len] if opts[:re_len]
|
||||||
info 're_len after' => @db.re_len
|
begin @db.open opts[:txn], file, opts[:name], opts[:type], opts[:flags] || 0, opts[:mode] || 0
|
||||||
begin
|
|
||||||
@db.open opts[:txn], file, opts[:name], opts[:type], opts[:flags] || 0, opts[:mode] || 0
|
|
||||||
rescue Object
|
rescue Object
|
||||||
close
|
close
|
||||||
raise $!
|
raise $!
|
||||||
|
|
Loading…
Reference in a new issue