fixed a VERY nasty bug with BPlusTree (header was erroneously overwritten)
This commit is contained in:
parent
44821eeece
commit
b8be9cb27a
@ -1590,10 +1590,10 @@ class BPlusTree {
|
|||||||
trigger_error("cannot initialize without nodesize, keylen specified\n") ;
|
trigger_error("cannot initialize without nodesize, keylen specified\n") ;
|
||||||
}
|
}
|
||||||
$this->length = 0;
|
$this->length = 0;
|
||||||
|
$this->root_seek = 22; //pack('a5LCL3',...)
|
||||||
$this->reset_header();
|
$this->reset_header();
|
||||||
$file = $this->file;
|
$file = $this->file;
|
||||||
fseek($file, 0, SEEK_END);
|
fseek($file, 0, SEEK_END);
|
||||||
$this->root_seek = ftell($file);
|
|
||||||
$this->root = new BplusTree_Node(
|
$this->root = new BplusTree_Node(
|
||||||
BPT_FLAG_LEAFANDROOT,
|
BPT_FLAG_LEAFANDROOT,
|
||||||
$this->nodesize, $this->keylen, $this->root_seek, $file
|
$this->nodesize, $this->keylen, $this->root_seek, $file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user