mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
ITS#7956 fix compact of empty env
This commit is contained in:
parent
af99820ac8
commit
98ed192949
@ -8589,8 +8589,12 @@ mdb_env_copyfd1(MDB_env *env, HANDLE fd)
|
||||
/* Set metapage 1 */
|
||||
mm->mm_last_pg = txn->mt_next_pgno - freecount - 1;
|
||||
mm->mm_dbs[1] = txn->mt_dbs[1];
|
||||
mm->mm_dbs[1].md_root = mm->mm_last_pg;
|
||||
mm->mm_txnid = 1;
|
||||
if (mm->mm_last_pg > 1) {
|
||||
mm->mm_dbs[1].md_root = mm->mm_last_pg;
|
||||
mm->mm_txnid = 1;
|
||||
} else {
|
||||
mm->mm_dbs[1].md_root = P_INVALID;
|
||||
}
|
||||
}
|
||||
my.mc_wlen[0] = env->me_psize * 2;
|
||||
my.mc_txn = txn;
|
||||
|
Loading…
Reference in New Issue
Block a user