[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().]
robust
Hallvard Furuseth 10 years ago committed by Hallvard Furuseth
parent b7db3d2938
commit 809be2ffe6
  1. 2
      libraries/liblmdb/lmdb.h
  2. 2
      libraries/liblmdb/mdb.c

@ -519,7 +519,7 @@ int mdb_env_create(MDB_env **env);
* <li>#MDB_ROBUST * <li>#MDB_ROBUST
* Initialize the lockfile to catch stale locks if robust mutexes * Initialize the lockfile to catch stale locks if robust mutexes
* are supported, so aborted processes will not block others. * 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). * by liblmdb built with MDB_USE_POSIX_SEM (such as BSD systems).
* Enabled by default on Windows. Some locking slowdown on Unix. * Enabled by default on Windows. Some locking slowdown on Unix.
* <li>#MDB_WRITEMAP * <li>#MDB_WRITEMAP

@ -4389,7 +4389,7 @@ fail:
* environment and re-opening it with the new flags. * environment and re-opening it with the new flags.
*/ */
#define CHANGEABLE (MDB_NOSYNC|MDB_NOMETASYNC|MDB_MAPASYNC|MDB_NOMEMINIT) #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) MDB_WRITEMAP|MDB_NOTLS|MDB_NOLOCK|MDB_NORDAHEAD)
#if VALID_FLAGS & PERSISTENT_FLAGS & (CHANGEABLE|CHANGELESS) #if VALID_FLAGS & PERSISTENT_FLAGS & (CHANGEABLE|CHANGELESS)

Loading…
Cancel
Save