mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
db-benchmark-test now recovers OK. Addresses #27.
git-svn-id: file:///svn/tokudb@1988 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
40bf7ef8b2
commit
3266e6d20c
1 changed files with 10 additions and 6 deletions
10
newbrt/brt.c
10
newbrt/brt.c
|
@ -632,16 +632,20 @@ static int handle_split_of_child (BRT t, BRTNODE node, int childnum,
|
|||
|
||||
// Slide the keys over
|
||||
{
|
||||
struct kv_pair *pivot = childsplitk->data;
|
||||
BYTESTRING bs = { .len = childsplitk->size,
|
||||
.data = childsplitk->data };
|
||||
.data = kv_pair_key(pivot) };
|
||||
r = toku_log_setpivot(txn, toku_txn_get_txnid(txn), toku_cachefile_filenum(t->cf), node->thisnodename, childnum, bs);
|
||||
if (r!=0) return r;
|
||||
}
|
||||
|
||||
for (cnum=node->u.n.n_children-1; cnum>childnum; cnum--) {
|
||||
node->u.n.childkeys[cnum] = node->u.n.childkeys[cnum-1];
|
||||
}
|
||||
node->u.n.childkeys[childnum]= (void*)childsplitk->data;
|
||||
assert((t->flags&TOKU_DB_DUPSORT)==0); // none of this works for dupsort databases. The size is wrong. The setpivot is wrong.
|
||||
node->u.n.childkeys[childnum]= pivot;
|
||||
node->u.n.totalchildkeylens += childsplitk->size;
|
||||
}
|
||||
|
||||
node->u.n.n_children++;
|
||||
|
||||
if (toku_brt_debug_mode) {
|
||||
|
|
Loading…
Add table
Reference in a new issue