]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10024 lmdb: fix MDB_PREVSNAPSHOT txnid initialization
authorHoward Chu <hyc@openldap.org>
Fri, 21 Feb 2025 04:42:03 +0000 (04:42 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 21 Feb 2025 04:42:03 +0000 (04:42 +0000)
libraries/liblmdb/mdb.c

index 4346c5b89fb0c47a5f8f54bdb491221c08456ce9..dd00498322ae205672677d9cf59144cf02216def 100644 (file)
@@ -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);