Commit e3800077 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

refs #5142], add function for getting cursor on directory

git-svn-id: file:///svn/toku/tokudb@45158 c7de825b-a66e-492c-adef-691d508d4ae1
parent 1a415885
...@@ -363,6 +363,7 @@ static void print_db_env_struct (void) { ...@@ -363,6 +363,7 @@ static void print_db_env_struct (void) {
"int (*get_lock_timeout) (DB_ENV *env, uint64_t *lock_wait_time_msec)", "int (*get_lock_timeout) (DB_ENV *env, uint64_t *lock_wait_time_msec)",
"int (*txn_xa_recover) (DB_ENV*, TOKU_XA_XID list[/*count*/], long count, /*out*/ long *retp, u_int32_t flags)", "int (*txn_xa_recover) (DB_ENV*, TOKU_XA_XID list[/*count*/], long count, /*out*/ long *retp, u_int32_t flags)",
"int (*get_txn_from_xid) (DB_ENV*, /*in*/ TOKU_XA_XID *, /*out*/ DB_TXN **)", "int (*get_txn_from_xid) (DB_ENV*, /*in*/ TOKU_XA_XID *, /*out*/ DB_TXN **)",
"int (*get_cursor_for_directory) (DB_ENV*, /*in*/ DB_TXN *, /*out*/ DBC **)",
NULL}; NULL};
sort_and_dump_fields("db_env", true, extra); sort_and_dump_fields("db_env", true, extra);
......
...@@ -2128,6 +2128,14 @@ toku_db_lt_panic(DB* db, int r) { ...@@ -2128,6 +2128,14 @@ toku_db_lt_panic(DB* db, int r) {
return toku_ydb_do_error(env, r, "%s", panic_string); return toku_ydb_do_error(env, r, "%s", panic_string);
} }
static int
env_get_cursor_for_directory(DB_ENV* env, DB_TXN* txn, DBC** c) {
if (!env_opened(env)) {
return EINVAL;
}
return toku_db_cursor(env->i->directory, txn, c, 0);
}
static int static int
toku_env_create(DB_ENV ** envp, u_int32_t flags) { toku_env_create(DB_ENV ** envp, u_int32_t flags) {
int r = ENOSYS; int r = ENOSYS;
...@@ -2199,6 +2207,7 @@ toku_env_create(DB_ENV ** envp, u_int32_t flags) { ...@@ -2199,6 +2207,7 @@ toku_env_create(DB_ENV ** envp, u_int32_t flags) {
USENV(log_flush); USENV(log_flush);
USENV(log_archive); USENV(log_archive);
USENV(create_loader); USENV(create_loader);
USENV(get_cursor_for_directory);
#undef USENV #undef USENV
// unlocked methods // unlocked methods
......
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