|
|
@ -5634,10 +5634,11 @@ mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mdb_mode_t mode |
|
|
|
/* Synchronous fd for meta writes. Needed even with
|
|
|
|
/* Synchronous fd for meta writes. Needed even with
|
|
|
|
* MDB_NOSYNC/MDB_NOMETASYNC, in case these get reset. |
|
|
|
* MDB_NOSYNC/MDB_NOMETASYNC, in case these get reset. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
rc = mdb_fopen(env, &fname, MDB_O_META, mode, &env->me_mfd); |
|
|
|
if (!(flags & (MDB_RDONLY|MDB_WRITEMAP))) { |
|
|
|
if (rc) |
|
|
|
rc = mdb_fopen(env, &fname, MDB_O_META, mode, &env->me_mfd); |
|
|
|
goto leave; |
|
|
|
if (rc) |
|
|
|
|
|
|
|
goto leave; |
|
|
|
|
|
|
|
} |
|
|
|
DPRINTF(("opened dbenv %p", (void *) env)); |
|
|
|
DPRINTF(("opened dbenv %p", (void *) env)); |
|
|
|
if (excl > 0 && !(flags & MDB_PREVSNAPSHOT)) { |
|
|
|
if (excl > 0 && !(flags & MDB_PREVSNAPSHOT)) { |
|
|
|
rc = mdb_env_share_locks(env, &excl); |
|
|
|
rc = mdb_env_share_locks(env, &excl); |
|
|
|