Commit 1002ded5 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

merge 1032 to 1032b. addresses #1032

git-svn-id: file:///svn/toku/tokudb.1032b@7824 c7de825b-a66e-492c-adef-691d508d4ae1
parent 9e06e600
......@@ -6,8 +6,6 @@ EXPORTS
log_compare @5
db_env_set_func_fsync @6
toku_get_maxrss @7
toku_ydb_error_all_cases @8
toku_set_trace_file @9
toku_close_trace_file @10
......
......@@ -440,9 +440,10 @@ static int toku_env_open(DB_ENV * env, const char *home, u_int32_t flags, int mo
return toku_ydb_do_error(env, EINVAL, "DB_USE_ENVIRON and DB_USE_ENVIRON_ROOT are incompatible with specifying a home\n");
}
}
#if !TOKU_WINDOWS
else if ((flags & DB_USE_ENVIRON) ||
((flags & DB_USE_ENVIRON_ROOT) && geteuid() == 0)) home = getenv("DB_HOME");
#endif
unused_flags &= ~DB_USE_ENVIRON & ~DB_USE_ENVIRON_ROOT;
if (!home) home = ".";
......@@ -2568,10 +2569,10 @@ static int toku_db_del(DB *db, DB_TXN *txn, DBT *key, u_int32_t flags) {
return r2;
}
#define cleanup() ({ \
#define cleanup() { \
if (data.data) toku_free(data.data); \
if (pkey.data) toku_free(pkey.data); \
})
}
memset(&data, 0, sizeof data); data.flags = DB_DBT_REALLOC;
memset(&pkey, 0, sizeof pkey); pkey.flags = DB_DBT_REALLOC;
......
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