Commit 0ee2e509 authored by Rich Prohaska's avatar Rich Prohaska

close #425

git-svn-id: file:///svn/tokudb@2349 c7de825b-a66e-492c-adef-691d508d4ae1
parent bca10bc0
......@@ -26,8 +26,15 @@ static void make_db (int n_locks) {
system("rm -rf " DIR);
r=mkdir(DIR, 0777); assert(r==0);
r=db_env_create(&env, 0); assert(r==0);
if (n_locks>0)
if (n_locks>0) {
r=env->set_lk_max_locks(env, n_locks); CKERR(r);
/* test the get_lk_max_locks method */
u_int32_t set_locks;
r=env->get_lk_max_locks(env, 0);
assert(r == EINVAL);
r=env->get_lk_max_locks(env, &set_locks);
assert(r == 0 && set_locks == n_locks);
}
r=env->open(env, DIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE, 0777); CKERR(r);
r=db_create(&db, env, 0); CKERR(r);
r=env->txn_begin(env, 0, &tid, 0); assert(r==0);
......
......@@ -634,6 +634,7 @@ static int toku_env_create(DB_ENV ** envp, u_int32_t flags) {
result->set_lg_dir = locked_env_set_lg_dir;
result->set_lg_max = locked_env_set_lg_max;
result->set_lk_max_locks = locked_env_set_lk_max_locks;
result->get_lk_max_locks = locked_env_get_lk_max_locks;
result->set_cachesize = locked_env_set_cachesize;
#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3
result->get_cachesize = locked_env_get_cachesize;
......
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