Commit c164c69e authored by Rich Prohaska's avatar Rich Prohaska

making cursors sticky is difficult. need the stateless cursor implementation. addresses #259

git-svn-id: file:///svn/tokudb@1604 c7de825b-a66e-492c-adef-691d508d4ae1
parent 25e32cde
...@@ -862,11 +862,11 @@ static int toku_c_get_next_dup(DBC *c, DBT *key, DBT *data) { ...@@ -862,11 +862,11 @@ static int toku_c_get_next_dup(DBC *c, DBT *key, DBT *data) {
if (r != 0) goto finish; if (r != 0) goto finish;
r = toku_c_get_noassociate(c, &nkey, &nval, DB_NEXT); r = toku_c_get_noassociate(c, &nkey, &nval, DB_NEXT);
if (r != 0) { if (r != 0) {
int rr = toku_c_get_noassociate(c, &nkey, &nval, DB_LAST); assert(rr == 0); /* sticky */ int rr = toku_c_get_noassociate(c, &nkey, &nval, DB_LAST); if (0) assert(rr == 0); /* sticky */
goto finish; goto finish;
} }
if (!keyeq(c, &currentkey, &nkey)) { if (!keyeq(c, &currentkey, &nkey)) {
int rr = toku_c_get_noassociate(c, &nkey, &nval, DB_PREV); assert(rr == 0); /* sticky */ int rr = toku_c_get_noassociate(c, &nkey, &nval, DB_PREV); if (0) assert(rr == 0); /* sticky */
r = DB_NOTFOUND; r = DB_NOTFOUND;
goto finish; goto finish;
} }
...@@ -891,11 +891,11 @@ static int toku_c_get_prev_dup(DBC *c, DBT *key, DBT *data) { ...@@ -891,11 +891,11 @@ static int toku_c_get_prev_dup(DBC *c, DBT *key, DBT *data) {
if (r != 0) goto finish; if (r != 0) goto finish;
r = toku_c_get_noassociate(c, &nkey, &nval, DB_PREV); r = toku_c_get_noassociate(c, &nkey, &nval, DB_PREV);
if (r != 0) { if (r != 0) {
int rr = toku_c_get_noassociate(c, &nkey, &nval, DB_FIRST); assert(rr == 0); /* sticky */ int rr = toku_c_get_noassociate(c, &nkey, &nval, DB_FIRST); if (0) assert(rr == 0); /* sticky */
goto finish; goto finish;
} }
if (!keyeq(c, &currentkey, &nkey)) { if (!keyeq(c, &currentkey, &nkey)) {
int rr = toku_c_get_noassociate(c, &nkey, &nval, DB_NEXT); assert(rr == 0); /* sticky */ int rr = toku_c_get_noassociate(c, &nkey, &nval, DB_NEXT); if (0) assert(rr == 0); /* sticky */
r = DB_NOTFOUND; r = DB_NOTFOUND;
goto finish; goto finish;
} }
......
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