mirror of
https://github.com/isar/libmdbx.git
synced 2025-10-18 22:09:03 +08:00
mdbx: rework page validation/checking, add MDBX_VALIDATION
option (squashed).
Здесь основная часть изменений преобразующих отладочную проверку страниц в регулярный и доступный пользователю осторожный/безопасный режим работы с потенциально поврежденной БД. Here the major part of the changes that transform a debugging check of pages into a regular and user-accessible careful/safe mode for working with a potentially corrupted database.
This commit is contained in:
5
mdbx.h
5
mdbx.h
@@ -1023,6 +1023,9 @@ LIBMDBX_API void mdbx_assert_fail(const MDBX_env *env, const char *msg,
|
||||
enum MDBX_env_flags_t {
|
||||
MDBX_ENV_DEFAULTS = 0,
|
||||
|
||||
/** Extra validation of DB structure and pages content. */
|
||||
MDBX_VALIDATION = UINT32_C(0x00002000),
|
||||
|
||||
/** No environment directory.
|
||||
*
|
||||
* By default, MDBX creates its environment in a directory whose pathname is
|
||||
@@ -5091,7 +5094,7 @@ LIBMDBX_API int mdbx_thread_unregister(const MDBX_env *env);
|
||||
* \retval 1 Transaction aborted asynchronous and reader slot
|
||||
* should be cleared immediately, i.e. read transaction
|
||||
* will not continue but \ref mdbx_txn_abort()
|
||||
* or \ref mdbx_txn_reset() will be called later.
|
||||
* nor \ref mdbx_txn_reset() will be called later.
|
||||
*
|
||||
* \retval 2 or great The reader process was terminated or killed,
|
||||
* and libmdbx should entirely reset reader registration.
|
||||
|
Reference in New Issue
Block a user