mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 20:34:13 +08:00
mdbx-tools: use MDBX_VALIDATION
.
This commit is contained in:
parent
6076c510f8
commit
19c5e4d424
@ -93,7 +93,7 @@ struct {
|
|||||||
#define dbi_main walk.dbi[MAIN_DBI]
|
#define dbi_main walk.dbi[MAIN_DBI]
|
||||||
#define dbi_meta walk.dbi[CORE_DBS]
|
#define dbi_meta walk.dbi[CORE_DBS]
|
||||||
|
|
||||||
int envflags = MDBX_RDONLY | MDBX_EXCLUSIVE;
|
int envflags = MDBX_RDONLY | MDBX_EXCLUSIVE | MDBX_VALIDATION;
|
||||||
MDBX_env *env;
|
MDBX_env *env;
|
||||||
MDBX_txn *txn;
|
MDBX_txn *txn;
|
||||||
MDBX_envinfo envinfo;
|
MDBX_envinfo envinfo;
|
||||||
|
@ -356,7 +356,9 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
rc = mdbx_env_open(
|
rc = mdbx_env_open(
|
||||||
env, envname,
|
env, envname,
|
||||||
envflags | (rescue ? MDBX_RDONLY | MDBX_EXCLUSIVE : MDBX_RDONLY), 0);
|
envflags | (rescue ? MDBX_RDONLY | MDBX_EXCLUSIVE | MDBX_VALIDATION
|
||||||
|
: MDBX_RDONLY),
|
||||||
|
0);
|
||||||
if (unlikely(rc != MDBX_SUCCESS)) {
|
if (unlikely(rc != MDBX_SUCCESS)) {
|
||||||
error("mdbx_env_open", rc);
|
error("mdbx_env_open", rc);
|
||||||
goto env_close;
|
goto env_close;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user