From 809be2ffe675836c1a6d1b224b33327652d2dfc5 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Mon, 21 Jul 2014 08:12:27 +0200 Subject: [PATCH] [Squash/Drop] Unsupported MDB_ROBUST -> EINVAL [Do we want this? Now users won't mistakenly think they have robust mutexes. Unless another process like mdb_stat inited the lockfile with another config. Does mdb_stat need a -R(obust) flag? OTOH a working config on one system can now EINVAL on another, though the user could use mdb_env_set_flags() to get the EINVAL there instead of in mdb_env_open().] --- libraries/liblmdb/lmdb.h | 2 +- libraries/liblmdb/mdb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/liblmdb/lmdb.h b/libraries/liblmdb/lmdb.h index ea95ecc..a8818ab 100644 --- a/libraries/liblmdb/lmdb.h +++ b/libraries/liblmdb/lmdb.h @@ -519,7 +519,7 @@ int mdb_env_create(MDB_env **env); *
  • #MDB_ROBUST * Initialize the lockfile to catch stale locks if robust mutexes * are supported, so aborted processes will not block others. - * Ignored when another process has the environment open, and + * Ignored when another process has the environment open. Unsupported * by liblmdb built with MDB_USE_POSIX_SEM (such as BSD systems). * Enabled by default on Windows. Some locking slowdown on Unix. *
  • #MDB_WRITEMAP diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 98d67b8..de5b936 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -4389,7 +4389,7 @@ fail: * environment and re-opening it with the new flags. */ #define CHANGEABLE (MDB_NOSYNC|MDB_NOMETASYNC|MDB_MAPASYNC|MDB_NOMEMINIT) -#define CHANGELESS (MDB_FIXEDMAP|MDB_NOSUBDIR|MDB_RDONLY|MDB_ROBUST| \ +#define CHANGELESS (MDB_FIXEDMAP|MDB_NOSUBDIR|MDB_RDONLY|ROBUST_FLAG| \ MDB_WRITEMAP|MDB_NOTLS|MDB_NOLOCK|MDB_NORDAHEAD) #if VALID_FLAGS & PERSISTENT_FLAGS & (CHANGEABLE|CHANGELESS)