mdbx-tools: use MDBX_VALIDATION.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-07-07 16:04:44 +03:00
parent 6076c510f8
commit 19c5e4d424
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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;