Commit 6cd0d57e authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

fix a couple of the failing cxx tests refs[t:2014]

git-svn-id: file:///svn/toku/tokudb@15047 c7de825b-a66e-492c-adef-691d508d4ae1
parent 0024eb77
......@@ -334,7 +334,14 @@ int main(int argc, char *argv[]) {
int r;
#if defined(USE_ENV) && USE_ENV
DbEnv env(DB_CXX_NO_EXCEPTIONS);
r = env.open(".", DB_INIT_MPOOL + DB_CREATE + DB_PRIVATE, 0777); assert(r == 0);
Db db(&env, DB_CXX_NO_EXCEPTIONS);
#else
Db db(0, DB_CXX_NO_EXCEPTIONS);
#endif
r = db.set_flags(DB_DUP + DB_DUPSORT); assert(r == 0);
unlink(FNAME);
r = db.open(0, FNAME, 0, DB_BTREE, DB_CREATE, 0777); assert(r == 0);
......
......@@ -56,7 +56,6 @@ void expect(Dbc *cursor, int k, int v) {
void test_reverse_compare(int n, int dup_flags) {
if (verbose) printf("test_reverse_compare:%d %d\n", n, dup_flags);
DbEnv * const null_env = 0;
Db *db;
DbTxn * const null_txn = 0;
const char * const fname = DIR "/reverse.compare.db";
......@@ -68,7 +67,9 @@ void test_reverse_compare(int n, int dup_flags) {
toku_os_mkdir(DIR, 0777);
/* create the dup database file */
db = new Db(null_env, 0);
DbEnv env(DB_CXX_NO_EXCEPTIONS);
r = env.open(".", DB_INIT_MPOOL + DB_CREATE + DB_PRIVATE, 0777); assert(r == 0);
db = new Db(&env, DB_CXX_NO_EXCEPTIONS);
assert(db);
r = db->set_flags(dup_flags);
assert(r == 0);
......@@ -97,7 +98,7 @@ void test_reverse_compare(int n, int dup_flags) {
assert(r == 0);
delete db;
db = new Db(null_env, 0);
db = new Db(&env, 0);
assert(db);
r = db->set_flags(dup_flags);
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