Added comment about static buffers being fine if they are of sufficient size
i.e. for limited queries.
git-svn-id: file:///svn/tokudb@1784 c7de825b-a66e-492c-adef-691d508d4ae1
Coded toku_rt_decrease capacity to reclaim memory if size of range tree becomes
too small for local array.
git-svn-id: file:///svn/tokudb@1779 c7de825b-a66e-492c-adef-691d508d4ae1
test Cases for pred/succ
* Empty tree
* Pred return nothing.
* Succ return nothing.
* 1 element tree.
* Pred
* Before
* left
* middle
* right
* after.
* Succ
* Before
* left
* middle
* right
* after
* 2 element tree.
* Pred, Succ
* In empty space
* Nothing to the left/Right (pred/succ) respectively.
* something to the left/right (pred/succ) respectively.
* On left endpoint.
* Nothing to the left/Right (pred/succ) respectively.
* something to the left/right (pred/succ) respectively.
* On right endpoint.
* Nothing to the left/Right (pred/succ) respectively.
* something to the left/right (pred/succ) respectively.
* In middle of range.
* Nothing to the left/Right (pred/succ) respectively.
* something to the left/right (pred/succ) respectively.
git-svn-id: file:///svn/tokudb@1774 c7de825b-a66e-492c-adef-691d508d4ae1
* Query Tests:
* Tree is empty (return none).
* Tree contains only elements to the left.
* Tree contains only elements to the right.
* Tree contains only elements to the left and to the right.
* Tree contains overlaps and elements to the left.
* Tree contains overlaps and elements to the right.
* Tree contains overlaps and elements to the left and to the right.
git-svn-id: file:///svn/tokudb@1769 c7de825b-a66e-492c-adef-691d508d4ae1
* Query Tests:
* Tree is empty (return none).
* Tree contains only elements to the left.
* Tree contains only elements to the right.
* Tree contains only elements to the left and to the right.
* Tree contains overlaps and elements to the left.
* Tree contains overlaps and elements to the right.
* Tree contains overlaps and elements to the left and to the right.
git-svn-id: file:///svn/tokudb@1768 c7de825b-a66e-492c-adef-691d508d4ae1
Test of /*
Limited/Unlimited Queries
Limit of k does not produce all, but limit of 0 does. Single point overlaps
*/
git-svn-id: file:///svn/tokudb@1757 c7de825b-a66e-492c-adef-691d508d4ae1
Added the following tests:
* Single point overlaps
* Tree: {|0-1|}, query of |1-2| returns |0-1|
* Tree: {|1-2|}, query of |0-1| returns |1-2|
* Tree: {|1-2|}, insert of of |0-1| success == allow_overlaps
* Tree: {|0-1|}, insert of of |1-2| success == allow_overlaps
* Complete overlaps
* Tree: {|0-3|}, query of |1-2| returns |0-3|
* Tree: {|1-2|}, query of |0-3| returns |1-2|
* Tree: {|1-2|}, insert of of |0-3| success == allow_overlaps
* Tree: {|0-3|}, insert of of |1-2| success == allow_overlaps
* Exact overlaps
* Tree: {|0-3|}, query of |0-3| returns |0-3|
* Tree: {|0-3|}, insert of of |0-3| success == allow_overlaps
Also freed buf and NULLed the pointer to help find memory leaks.
git-svn-id: file:///svn/tokudb@1745 c7de825b-a66e-492c-adef-691d508d4ae1
First set of test cases for range trees.
linear.c is stub implementation so we can compile and write tests before
we actually implement the range tree.
The makefiles were modified just enough to get this to work, and have to
be cleaned up a lot.
git-svn-id: file:///svn/tokudb@1740 c7de825b-a66e-492c-adef-691d508d4ae1