libmdbx
libmdbx copied to clipboard
Simple careful mode for working with corrupted DB
Add MDBX_CAREFUL environment flag which engages additional checks and turns on calling mdbx_page_check() for each page fetched to a cursor stack.
This also allows us to move some of the checks that are currently performed in normal mode and which are disengageable by the MDBX_DISABLE_PAGECHECKS build option, under the control of this flag. Ideally, it is desirable to get rid of the MDBX_DISABLE_PAGECHECKS option altogether.
Next, MDBX_CAREFUL should be always engaged by all mdbx-tools, especially by mdbx_chk and by mdbx_dump with -r option (recovery).
Related to https://github.com/erthink/libmdbx/issues/217.