mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 15:24:16 +01:00
making cursors sticky is difficult. need the stateless cursor implementation. addresses #259
git-svn-id: file:///svn/tokudb@1604 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
d3239fc444
commit
4b52108a21
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue