Commit 08eb5d86 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5671 fix an off-by-one error


git-svn-id: file:///svn/toku/tokudb@50065 c7de825b-a66e-492c-adef-691d508d4ae1
parent f88e6bbf
...@@ -1253,7 +1253,7 @@ maybe_merge_pinned_nonleaf_nodes( ...@@ -1253,7 +1253,7 @@ maybe_merge_pinned_nonleaf_nodes(
XREALLOC_N(new_n_children-1, a->childkeys); XREALLOC_N(new_n_children-1, a->childkeys);
toku_copy_dbt(&a->childkeys[old_n_children-1], *parent_splitk); toku_copy_dbt(&a->childkeys[old_n_children-1], *parent_splitk);
a->totalchildkeylens += parent_splitk->size; a->totalchildkeylens += parent_splitk->size;
for (int i = 0; i < b->n_children; ++i) { for (int i = 0; i < b->n_children - 1; ++i) {
toku_copy_dbt(&a->childkeys[old_n_children + i], b->childkeys[i]); toku_copy_dbt(&a->childkeys[old_n_children + i], b->childkeys[i]);
a->totalchildkeylens += b->childkeys[i].size; a->totalchildkeylens += b->childkeys[i].size;
toku_init_dbt(&b->childkeys[i]); toku_init_dbt(&b->childkeys[i]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment