From a4b13dbed9ff21c3b992ee21ba708730186296e4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 25 Apr 2020 11:57:29 +0300 Subject: libmdbx: merge with 0.7 final version --- tools/mdbx_chk/src/mdbx_chk.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tools/mdbx_chk') diff --git a/tools/mdbx_chk/src/mdbx_chk.cc b/tools/mdbx_chk/src/mdbx_chk.cc index 5b41402f85..f2725bd37f 100644 --- a/tools/mdbx_chk/src/mdbx_chk.cc +++ b/tools/mdbx_chk/src/mdbx_chk.cc @@ -23,7 +23,7 @@ #endif /* _MSC_VER (warnings) */ #define MDBX_TOOLS /* Avoid using internal mdbx_assert() */ -#include "../../libs/libmdbx/src/src/elements/internals.h" +#include "../../libs/libmdbx/src/src/internals.h" typedef struct flagbit { int bit; @@ -39,8 +39,8 @@ const flagbit dbflags[] = {{MDBX_DUPSORT, "dupsort"}, {0, NULL}}; #if defined(_WIN32) || defined(_WIN64) -#include "../../libs/libmdbx/src/src/tools/wingetopt.h" -#include "../../libs/libmdbx/src/src/tools/wingetopt.c" +#include "../../libs/libmdbx/src/src/wingetopt.h" +#include "../../libs/libmdbx/src/src/wingetopt.c" static volatile BOOL user_break; static BOOL WINAPI ConsoleBreakHandlerRoutine(DWORD dwCtrlType) { @@ -562,6 +562,12 @@ static int process_db(MDBX_dbi dbi_handle, char *dbi_name, visitor *handler, uint64_t record_count = 0, dups = 0; uint64_t key_bytes = 0, data_bytes = 0; + if ((MDBX_TXN_FINISHED | MDBX_TXN_ERROR) & mdbx_txn_flags(txn)) { + print(" ! abort processing '%s' due to a previous error\n", + dbi_name ? dbi_name : "@MAIN"); + return MDBX_BAD_TXN; + } + if (dbi_handle == ~0u) { rc = mdbx_dbi_open(txn, dbi_name, 0, &dbi_handle); if (rc) { -- cgit v1.2.3