From 4b52108a21d3221aa17b0ee52beb38ed6eb26da8 Mon Sep 17 00:00:00 2001 From: Rich Prohaska Date: Fri, 11 Jan 2008 16:24:43 +0000 Subject: [PATCH] making cursors sticky is difficult. need the stateless cursor implementation. addresses #259 git-svn-id: file:///svn/tokudb@1604 c7de825b-a66e-492c-adef-691d508d4ae1 --- src/ydb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ydb.c b/src/ydb.c index 8f1a1bb0df5..2c47de4a7dd 100644 --- a/src/ydb.c +++ b/src/ydb.c @@ -862,11 +862,11 @@ static int toku_c_get_next_dup(DBC *c, DBT *key, DBT *data) { if (r != 0) goto finish; r = toku_c_get_noassociate(c, &nkey, &nval, DB_NEXT); 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; } if (!keyeq(c, ¤tkey, &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; goto finish; } @@ -891,11 +891,11 @@ static int toku_c_get_prev_dup(DBC *c, DBT *key, DBT *data) { if (r != 0) goto finish; r = toku_c_get_noassociate(c, &nkey, &nval, DB_PREV); 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; } if (!keyeq(c, ¤tkey, &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; goto finish; }