From: Howard Chu Date: Fri, 20 Jun 2014 16:00:33 +0000 (-0700) Subject: Fix multiple subDBs X-Git-Tag: OPENLDAP_REL_ENG_2_4_40~128^2~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c05f45b7dd83ab582c99a720fd44d6a6ba8ddf32;p=openldap Fix multiple subDBs --- diff --git a/libraries/liblmdb/mdb_load.c b/libraries/liblmdb/mdb_load.c index 967b0ff249..326e8e78a7 100644 --- a/libraries/liblmdb/mdb_load.c +++ b/libraries/liblmdb/mdb_load.c @@ -300,9 +300,7 @@ int main(int argc, char *argv[]) envname = argv[optind]; rc = mdb_env_create(&env); - if (subname) { - mdb_env_set_maxdbs(env, 2); - } + mdb_env_set_maxdbs(env, 2); rc = mdb_env_open(env, envname, envflags, 0664); if (rc) { @@ -329,7 +327,7 @@ int main(int argc, char *argv[]) goto env_close; } - rc = mdb_open(txn, subname, flags, &dbi); + rc = mdb_open(txn, subname, flags|MDB_CREATE, &dbi); if (rc) { printf("mdb_open failed, error %d %s\n", rc, mdb_strerror(rc)); goto txn_abort;