Commit 92910017 authored by Rich Prohaska's avatar Rich Prohaska

cursor get_both_range now works like BDB. closes #187

git-svn-id: file:///svn/tokudb@1886 c7de825b-a66e-492c-adef-691d508d4ae1
parent 94a7138c
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
#include "test.h" #include "test.h"
void db_put(DB *db, int k, int v) { void db_put(DB *db, int k, int v) {
DB_TXN * const null_txn = 0; DB_TXN * const null_txn = 0;
DBT key, val; DBT key, val;
...@@ -141,10 +139,6 @@ void test_icdi_search(int n, int dup_mode) { ...@@ -141,10 +139,6 @@ void test_icdi_search(int n, int dup_mode) {
r = db->cursor(db, null_txn, &cursor, 0); assert(r == 0); r = db->cursor(db, null_txn, &cursor, 0); assert(r == 0);
expect_cursor_get_both_range(cursor, k, v, 0); expect_cursor_get_both_range(cursor, k, v, 0);
expect_cursor_get_current(cursor, k, v); expect_cursor_get_current(cursor, k, v);
#if USE_TDB
expect_cursor_get_both_range(cursor, 0, 0, 0);
expect_cursor_get_current(cursor, k, v);
#endif
r = cursor->c_close(cursor); assert(r == 0); r = cursor->c_close(cursor); assert(r == 0);
} }
...@@ -155,14 +149,12 @@ void test_icdi_search(int n, int dup_mode) { ...@@ -155,14 +149,12 @@ void test_icdi_search(int n, int dup_mode) {
if (n>1) if (n>1)
expect_cursor_get_both_range(cursor, htonl(1+n/2), 0, 0); expect_cursor_get_both_range(cursor, htonl(1+n/2), 0, 0);
expect_cursor_get_both_range(cursor, htonl(1+n), 0, DB_NOTFOUND); expect_cursor_get_both_range(cursor, htonl(1+n), 0, DB_NOTFOUND);
#if USE_BDB
r = cursor->c_close(cursor); assert(r == 0); r = cursor->c_close(cursor); assert(r == 0);
r = db->cursor(db, null_txn, &cursor, 0); assert(r == 0); r = db->cursor(db, null_txn, &cursor, 0); assert(r == 0);
#endif
for (i=0; i<n; i++) { for (i=0; i<n; i++) {
expect_cursor_get(cursor, htonl(1+n/2), htonl(1+n+i)); expect_cursor_get(cursor, htonl(1+n/2), htonl(1+n+i));
} }
r = cursor->c_close(cursor); assert(r == 0); r = cursor->c_close(cursor); assert(r == 0);
r = db->close(db, 0); assert(r == 0); r = db->close(db, 0); assert(r == 0);
......
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