From b83bcb1be66ac66c58c4f57eaf6247b88fd437d9 Mon Sep 17 00:00:00 2001 From: Rich Prohaska Date: Mon, 3 Dec 2007 13:36:52 +0000 Subject: [PATCH] add DB_CURRENT. addresses #48 git-svn-id: file:///svn/tokudb@893 c7de825b-a66e-492c-adef-691d508d4ae1 --- newbrt/brt.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/newbrt/brt.c b/newbrt/brt.c index 71915d98009..7a0751d023a 100644 --- a/newbrt/brt.c +++ b/newbrt/brt.c @@ -2863,6 +2863,13 @@ int toku_brt_cursor_get (BRT_CURSOR cursor, DBT *kbt, DBT *vbt, int flags, TOKUT r = toku_pma_cursor_get_current(cursor->pmacurs, kbt, vbt); if (r!=0) goto died0; if (r == 0) assert_cursor_path(cursor); break; + case DB_CURRENT: + if (cursor->path_len<=0) { + r = EINVAL; goto died0; + } + r=toku_pma_cursor_get_current(cursor->pmacurs, kbt, vbt); if (r!=0) goto died0; + if (r == 0) assert_cursor_path(cursor); + break; case DB_SET: r = unpin_cursor(cursor); assert(r == 0);