Commit 5c7fb477 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #288

Fixed some bugs in find_range test.

git-svn-id: file:///svn/tokudb@1876 c7de825b-a66e-492c-adef-691d508d4ae1
parent 41da63f1
...@@ -62,6 +62,7 @@ void runinsert(int rexpect, toku_range* toinsert) { ...@@ -62,6 +62,7 @@ void runinsert(int rexpect, toku_range* toinsert) {
void tests(BOOL allow_overlaps) { void tests(BOOL allow_overlaps) {
toku_range expect; toku_range expect;
toku_range query; toku_range query;
toku_range toinsert;
/* /*
Single point overlaps Single point overlaps
...@@ -84,12 +85,12 @@ void tests(BOOL allow_overlaps) { ...@@ -84,12 +85,12 @@ void tests(BOOL allow_overlaps) {
/* Tree: {|1-2|}, insert of of |0-1| success == allow_overlaps */ /* Tree: {|1-2|}, insert of of |0-1| success == allow_overlaps */
setup_tree(allow_overlaps, 1, 2, 0); setup_tree(allow_overlaps, 1, 2, 0);
runinsert((allow_overlaps ? 0 : EDOM), init_range(&query, 0, 1, -1)); runinsert((allow_overlaps ? 0 : EDOM), init_range(&toinsert, 0, 1, 0));
close_tree(); close_tree();
/* Tree: {|0-1|}, insert of of |1-2| success == allow_overlaps */ /* Tree: {|0-1|}, insert of of |1-2| success == allow_overlaps */
setup_tree(allow_overlaps, 0, 1, 0); setup_tree(allow_overlaps, 0, 1, 0);
runinsert((allow_overlaps ? 0 : EDOM), init_range(&query, 1, 2, -1)); runinsert((allow_overlaps ? 0 : EDOM), init_range(&toinsert, 1, 2, 0));
close_tree(); close_tree();
/* /*
...@@ -113,12 +114,12 @@ void tests(BOOL allow_overlaps) { ...@@ -113,12 +114,12 @@ void tests(BOOL allow_overlaps) {
/* Tree: {|1-2|}, insert of of |0-3| success == allow_overlaps */ /* Tree: {|1-2|}, insert of of |0-3| success == allow_overlaps */
setup_tree(allow_overlaps, 1, 2, 0); setup_tree(allow_overlaps, 1, 2, 0);
runinsert((allow_overlaps ? 0 : EDOM), init_range(&query, 0, 3, -1)); runinsert((allow_overlaps ? 0 : EDOM), init_range(&toinsert, 0, 3, 0));
close_tree(); close_tree();
/* Tree: {|0-3|}, insert of of |1-2| success == allow_overlaps */ /* Tree: {|0-3|}, insert of of |1-2| success == allow_overlaps */
setup_tree(allow_overlaps, 0, 3, 0); setup_tree(allow_overlaps, 0, 3, 0);
runinsert((allow_overlaps ? 0 : EDOM), init_range(&query, 1, 2, -1)); runinsert((allow_overlaps ? 0 : EDOM), init_range(&toinsert, 1, 2, 0));
close_tree(); close_tree();
/* /*
...@@ -135,7 +136,7 @@ void tests(BOOL allow_overlaps) { ...@@ -135,7 +136,7 @@ void tests(BOOL allow_overlaps) {
/* Tree: {(|0-3|,0)}, insert of of (|0-3|,1) success == allow_overlaps */ /* Tree: {(|0-3|,0)}, insert of of (|0-3|,1) success == allow_overlaps */
setup_tree(allow_overlaps, 0, 3, 0); setup_tree(allow_overlaps, 0, 3, 0);
runinsert((allow_overlaps ? 0 : EDOM), init_range(&expect, 0, 3, 1)); runinsert((allow_overlaps ? 0 : EDOM), init_range(&toinsert, 0, 3, 1));
close_tree(); 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