Commit 3364bd0b authored by John Esmet's avatar John Esmet Committed by Yoni Fogel

refs #5490 dup/nodup artifacts


git-svn-id: file:///svn/toku/tokudb@48249 c7de825b-a66e-492c-adef-691d508d4ae1
parent 2f4b11f4
...@@ -185,18 +185,10 @@ static void print_defines (void) { ...@@ -185,18 +185,10 @@ static void print_defines (void) {
printf("#define DB_DELETE_ANY %d\n", 1<<16); // private tokudb printf("#define DB_DELETE_ANY %d\n", 1<<16); // private tokudb
dodefine(DB_FIRST); dodefine(DB_FIRST);
//dodefine(DB_GET_BOTH); No longer supported #2862.
//dodefine(DB_GET_BOTH_RANGE); No longer supported because we only support NODUP. #2862.
dodefine(DB_LAST); dodefine(DB_LAST);
dodefine(DB_CURRENT); dodefine(DB_CURRENT);
dodefine(DB_NEXT); dodefine(DB_NEXT);
//dodefine(DB_NEXT_DUP); No longer supported #2862
dodefine(DB_NEXT_NODUP);
dodefine(DB_PREV); dodefine(DB_PREV);
#if defined(DB_PREV_DUP)
//dodefine(DB_PREV_DUP);
#endif
dodefine(DB_PREV_NODUP);
dodefine(DB_SET); dodefine(DB_SET);
dodefine(DB_SET_RANGE); dodefine(DB_SET_RANGE);
printf("#define DB_CURRENT_BINDING 253\n"); // private tokudb printf("#define DB_CURRENT_BINDING 253\n"); // private tokudb
......
...@@ -5062,17 +5062,17 @@ toku_ft_cursor_get (FT_CURSOR cursor, DBT *key, FT_GET_CALLBACK_FUNCTION getf, v ...@@ -5062,17 +5062,17 @@ toku_ft_cursor_get (FT_CURSOR cursor, DBT *key, FT_GET_CALLBACK_FUNCTION getf, v
case DB_LAST: case DB_LAST:
return toku_ft_cursor_last(cursor, getf, getf_v); return toku_ft_cursor_last(cursor, getf, getf_v);
case DB_NEXT: case DB_NEXT:
case DB_NEXT_NODUP: if (ft_cursor_not_set(cursor)) {
if (ft_cursor_not_set(cursor))
return toku_ft_cursor_first(cursor, getf, getf_v); return toku_ft_cursor_first(cursor, getf, getf_v);
else } else {
return toku_ft_cursor_next(cursor, getf, getf_v); return toku_ft_cursor_next(cursor, getf, getf_v);
}
case DB_PREV: case DB_PREV:
case DB_PREV_NODUP: if (ft_cursor_not_set(cursor)) {
if (ft_cursor_not_set(cursor))
return toku_ft_cursor_last(cursor, getf, getf_v); return toku_ft_cursor_last(cursor, getf, getf_v);
else } else {
return toku_ft_cursor_prev(cursor, getf, getf_v); return toku_ft_cursor_prev(cursor, getf, getf_v);
}
case DB_SET: case DB_SET:
return toku_ft_cursor_set(cursor, key, getf, getf_v); return toku_ft_cursor_set(cursor, key, getf, getf_v);
case DB_SET_RANGE: case DB_SET_RANGE:
......
...@@ -130,13 +130,6 @@ static void run_test(void) { ...@@ -130,13 +130,6 @@ static void run_test(void) {
/* ********************************************************************** */ /* ********************************************************************** */
/* Test DB_PREV works properly. */ /* Test DB_PREV works properly. */
test_skip_key(DB_PREV, false); test_skip_key(DB_PREV, false);
/* ********************************************************************** */
/* Test DB_PREV_NODUP works properly. */
test_skip_key(DB_PREV_NODUP, false);
/* ********************************************************************** */
/* Test DB_NEXT_NODUP works properly. */
test_skip_key(DB_NEXT_NODUP, true);
/* ********************************************************************** */
} }
int int
......
...@@ -540,11 +540,9 @@ test (void) { ...@@ -540,11 +540,9 @@ test (void) {
test_set_range( DB_SET_RANGE_REVERSE, -1); test_set_range( DB_SET_RANGE_REVERSE, -1);
#endif #endif
/* ********************************************************************** */ /* ********************************************************************** */
test_next( DB_NEXT); test_next(DB_NEXT);
test_next( DB_NEXT_NODUP);
/* ********************************************************************** */ /* ********************************************************************** */
test_prev( DB_PREV); test_prev(DB_PREV);
test_prev( DB_PREV_NODUP);
/* ********************************************************************** */ /* ********************************************************************** */
test_dbdel(); test_dbdel();
/* ********************************************************************** */ /* ********************************************************************** */
......
...@@ -655,12 +655,10 @@ toku_c_get(DBC* c, DBT* key, DBT* val, uint32_t flag) { ...@@ -655,12 +655,10 @@ toku_c_get(DBC* c, DBT* key, DBT* val, uint32_t flag) {
r = toku_c_getf_last(c, remaining_flags, c_get_wrapper_callback, &context); r = toku_c_getf_last(c, remaining_flags, c_get_wrapper_callback, &context);
break; break;
case (DB_NEXT): case (DB_NEXT):
case (DB_NEXT_NODUP):
query_context_wrapped_init(&context, c, key, val); query_context_wrapped_init(&context, c, key, val);
r = toku_c_getf_next(c, remaining_flags, c_get_wrapper_callback, &context); r = toku_c_getf_next(c, remaining_flags, c_get_wrapper_callback, &context);
break; break;
case (DB_PREV): case (DB_PREV):
case (DB_PREV_NODUP):
query_context_wrapped_init(&context, c, key, val); query_context_wrapped_init(&context, c, key, val);
r = toku_c_getf_prev(c, remaining_flags, c_get_wrapper_callback, &context); r = toku_c_getf_prev(c, remaining_flags, c_get_wrapper_callback, &context);
break; break;
......
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