From b6c4293f6fd6e3a3e4d5b6571fe3da7e80699597 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 21 Feb 2025 04:42:03 +0000 Subject: [PATCH] ITS#10024 lmdb: fix MDB_PREVSNAPSHOT txnid initialization --- libraries/liblmdb/mdb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 4346c5b89f..dd00498322 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -5446,6 +5446,9 @@ mdb_env_open2(MDB_env *env, int prev) #endif env->me_maxpg = env->me_mapsize / env->me_psize; + if (prev && env->me_txns) + env->me_txns->mti_txnid = meta.mm_txnid; + #if MDB_DEBUG { MDB_meta *meta = mdb_env_pick_meta(env);