Commit f9982d4a authored by Yoni Fogel's avatar Yoni Fogel

Addresses #855, #856.

Bugfix in integration of omt cursors.
We were considering provdel leaf entries as not deleted.

git-svn-id: file:///svn/tokudb@4343 c7de825b-a66e-492c-adef-691d508d4ae1
parent 43d9a43f
...@@ -3067,8 +3067,10 @@ static int brt_cursor_next_shortcut (BRT_CURSOR cursor, DBT *outkey, DBT *outval ...@@ -3067,8 +3067,10 @@ static int brt_cursor_next_shortcut (BRT_CURSOR cursor, DBT *outkey, DBT *outval
if (h_counter != cursor->root_put_counter) return -1; if (h_counter != cursor->root_put_counter) return -1;
} }
OMTVALUE le; OMTVALUE le;
get_next:;
int r = toku_omt_cursor_next(cursor->omtcursor, &le); int r = toku_omt_cursor_next(cursor->omtcursor, &le);
if (r==0) { if (r==0) {
if (le_is_provdel(le)) goto get_next;
DBT key,val; DBT key,val;
toku_init_dbt(&key); key.flags = DB_DBT_MALLOC; toku_init_dbt(&key); key.flags = DB_DBT_MALLOC;
toku_init_dbt(&val); val.flags = DB_DBT_MALLOC; toku_init_dbt(&val); val.flags = DB_DBT_MALLOC;
...@@ -3153,8 +3155,10 @@ static int brt_cursor_prev_shortcut (BRT_CURSOR cursor, DBT *outkey, DBT *outval ...@@ -3153,8 +3155,10 @@ static int brt_cursor_prev_shortcut (BRT_CURSOR cursor, DBT *outkey, DBT *outval
if (h_counter != cursor->root_put_counter) return -1; if (h_counter != cursor->root_put_counter) return -1;
} }
OMTVALUE le; OMTVALUE le;
get_prev:;
int r = toku_omt_cursor_prev(cursor->omtcursor, &le); int r = toku_omt_cursor_prev(cursor->omtcursor, &le);
if (r==0) { if (r==0) {
if (le_is_provdel(le)) goto get_prev;
DBT key,val; DBT key,val;
toku_init_dbt(&key); key.flags = DB_DBT_MALLOC; toku_init_dbt(&key); key.flags = DB_DBT_MALLOC;
toku_init_dbt(&val); val.flags = DB_DBT_MALLOC; toku_init_dbt(&val); val.flags = DB_DBT_MALLOC;
......
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