mdbx: fix auxiliary mdbx_txn_valgrind().

Fixed https://github.com/erthink/libmdbx/issues/273.
This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-02-27 15:42:48 +03:00
parent d01e44db0c
commit 6d61b18325

View File

@ -7377,7 +7377,7 @@ static void mdbx_txn_valgrind(MDBX_env *env, MDBX_txn *txn) {
pgno_t last = MAX_PAGENO + 1; pgno_t last = MAX_PAGENO + 1;
if (env->me_txn0 && env->me_txn0->mt_owner == mdbx_thread_self()) { if (env->me_txn0 && env->me_txn0->mt_owner == mdbx_thread_self()) {
/* inside write-txn */ /* inside write-txn */
MDBX_meta *head = mdbx_meta_head(env); const MDBX_meta *head = constmeta_prefer_last(env);
last = head->mm_geo.next; last = head->mm_geo.next;
} else if (env->me_flags & MDBX_RDONLY) { } else if (env->me_flags & MDBX_RDONLY) {
/* read-only mode, no write-txn, no wlock mutex */ /* read-only mode, no write-txn, no wlock mutex */