Commit 8d274d55 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Start testing {{{toku_brt_keyrange}}}.

There are 4 cases
 1. flattened nodup (tested in this changeset)
 1. unflattened nodup (untested)
 1. flattened dupsort (untested)
 1. unflattened dupsort (untested)


git-svn-id: file:///svn/tokudb@3931 c7de825b-a66e-492c-adef-691d508d4ae1
parent 39cd2c35
......@@ -3182,7 +3182,7 @@ static void toku_brt_keyrange_internal (BRT brt, CACHEKEY nodename, DBT *key, u_
}
prevcomp=comp;
}
if (prevcomp<0) {
if (prevcomp>0) {
*greater += BNC_SUBTREE_LEAFENTRY_ESTIMATE(node, i);
} else {
toku_brt_keyrange_internal(brt, BNC_DISKOFF(node, i), key, less, equal, greater);
......@@ -3199,6 +3199,10 @@ static void toku_brt_keyrange_internal (BRT brt, CACHEKEY nodename, DBT *key, u_
(*greater)--;
}
}
{
int rr = toku_unpin_brtnode(brt, node);
assert(rr == 0);
}
}
int toku_brt_keyrange (BRT brt, DBT *key, u_int64_t *less, u_int64_t *equal, u_int64_t *greater) {
......
......@@ -73,4 +73,6 @@ enum brt_header_flags {
TOKU_DB_DUPSORT = 2,
};
int toku_brt_keyrange (BRT brt, DBT *key, u_int64_t *less, u_int64_t *equal, u_int64_t *greater);
#endif
......@@ -57,6 +57,7 @@ REGRESSION_TESTS = \
cachetable-test2 \
fifo-test \
list-test \
keyrange \
log-test \
log-test2 \
log-test3 \
......
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