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:
Леонид Юрьев (Leonid Yuriev)
2022-06-30 21:38:32 +03:00
parent 6c5ff863ff
commit d4ef9bf233
9 changed files with 516 additions and 435 deletions

View File

@@ -805,9 +805,9 @@ static int process_db(MDBX_dbi dbi_handle, char *dbi_name, visitor *handler,
}
if (ignore_wrong_order) { /* for debugging with enabled assertions */
mc->mc_flags |= C_SKIPORD;
mc->mc_checking |= CC_SKIPORD;
if (mc->mc_xcursor)
mc->mc_xcursor->mx_cursor.mc_flags |= C_SKIPORD;
mc->mc_xcursor->mx_cursor.mc_checking |= CC_SKIPORD;
}
const size_t maxkeysize = mdbx_env_get_maxkeysize_ex(env, flags);