Commit 2be274e3 authored by Vincenzo Liberatore's avatar Vincenzo Liberatore

Addresses #307

Tests consolidation of various intervals, some overlapping at one point,
other ones dominated by the new interval, and combinations of these cases.

git-svn-id: file:///svn/tokudb@1995 c7de825b-a66e-492c-adef-691d508d4ae1
parent 27e80df5
...@@ -361,6 +361,60 @@ void runtest(BOOL dups) { ...@@ -361,6 +361,60 @@ void runtest(BOOL dups) {
lt_find(dups, rt, 1, 0, neg_infinite, 5, infinite, txn); lt_find(dups, rt, 1, 0, neg_infinite, 5, infinite, txn);
rt = NULL; rt = NULL;
close_tree(); close_tree();
/* ************************************** */
setup_tree(dups);
lt_insert(dups, 1, neg_infinite, 3, infinite);
lt_insert(dups, 4, neg_infinite, 6, infinite);
lt_insert(dups, 2, neg_infinite, 5, infinite);
rt = __toku_lt_ifexist_selfread(lt, txn); assert(rt);
lt_find(dups, rt, 1, 1, neg_infinite, 6, infinite, txn);
rt = lt->mainread; assert(rt);
lt_find(dups, rt, 1, 1, neg_infinite, 6, infinite, txn);
close_tree();
setup_tree(dups);
lt_insert(dups, neg_infinite, neg_infinite, 3, infinite);
lt_insert(dups, 4, neg_infinite, 5, infinite);
lt_insert(dups, 6, neg_infinite, 8, infinite);
lt_insert(dups, 2, neg_infinite, 7, infinite);
rt = __toku_lt_ifexist_selfread(lt, txn); assert(rt);
lt_find(dups, rt, 1, neg_infinite, neg_infinite, 8, infinite, txn);
rt = lt->mainread; assert(rt);
lt_find(dups, rt, 1, neg_infinite, neg_infinite, 8, infinite, txn);
close_tree();
setup_tree(dups);
lt_insert(dups, 1, neg_infinite, 2, infinite);
lt_insert(dups, 3, neg_infinite, infinite, infinite);
lt_insert(dups, 2, neg_infinite, 3, infinite);
rt = __toku_lt_ifexist_selfread(lt, txn); assert(rt);
lt_find(dups, rt, 1, 1, neg_infinite, infinite, infinite, txn);
rt = lt->mainread; assert(rt);
lt_find(dups, rt, 1, 1, neg_infinite, infinite, infinite, txn);
close_tree();
setup_tree(dups);
lt_insert(dups, 1, neg_infinite, 2, infinite);
lt_insert(dups, 3, neg_infinite, 4, infinite);
lt_insert(dups, 5, neg_infinite, 6, infinite);
lt_insert(dups, 2, neg_infinite, 5, infinite);
rt = __toku_lt_ifexist_selfread(lt, txn); assert(rt);
lt_find(dups, rt, 1, 1, neg_infinite, 6, infinite, txn);
rt = lt->mainread; assert(rt);
lt_find(dups, rt, 1, 1, neg_infinite, 6, infinite, txn);
close_tree();
setup_tree(dups);
lt_insert(dups, 1, neg_infinite, 2, infinite);
lt_insert(dups, 3, neg_infinite, 5, infinite);
lt_insert(dups, 2, neg_infinite, 4, infinite);
rt = __toku_lt_ifexist_selfread(lt, txn); assert(rt);
lt_find(dups, rt, 1, 1, neg_infinite, 5, infinite, txn);
rt = lt->mainread; assert(rt);
lt_find(dups, rt, 1, 1, neg_infinite, 5, infinite, txn);
close_tree();
/* ************************************** */
} }
......
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