From 19c5e4d42427b3c549c66936fd0c01657021d501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Thu, 7 Jul 2022 16:04:44 +0300 Subject: [PATCH] mdbx-tools: use `MDBX_VALIDATION`. --- src/mdbx_chk.c | 2 +- src/mdbx_dump.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mdbx_chk.c b/src/mdbx_chk.c index e05a10c5..e9003573 100644 --- a/src/mdbx_chk.c +++ b/src/mdbx_chk.c @@ -93,7 +93,7 @@ struct { #define dbi_main walk.dbi[MAIN_DBI] #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_txn *txn; MDBX_envinfo envinfo; diff --git a/src/mdbx_dump.c b/src/mdbx_dump.c index 0f57b599..170a5332 100644 --- a/src/mdbx_dump.c +++ b/src/mdbx_dump.c @@ -356,7 +356,9 @@ int main(int argc, char *argv[]) { rc = mdbx_env_open( 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)) { error("mdbx_env_open", rc); goto env_close;