ITS#9861 fix readonly regression from #9017

mdb.master3
Joakim Hassila 2 years ago committed by Howard Chu
parent 64fc67f4ae
commit 0179cfab57
  1. 2
      libraries/liblmdb/mdb.c

@ -6074,9 +6074,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.
*/ */
if (!(flags & (MDB_RDONLY|MDB_WRITEMAP))) {
rc = mdb_fopen(env, &fname, MDB_O_META, mode, &env->me_mfd); rc = mdb_fopen(env, &fname, MDB_O_META, mode, &env->me_mfd);
if (rc) if (rc)
goto leave; 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);

Loading…
Cancel
Save