diff --git a/CHANGES b/CHANGES index dad2fe46..cb19ff64 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,7 @@ MDBX Add MDB_PREV_MULTIPLE Fix MDB_CP_COMPACT (ITS#8209) Add error MDB_PROBLEM, replace some MDB_CORRUPTED + Backport fixes for ITS#8406 LMDB 0.9.19 Release Engineering Fix mdb_env_cwalk cursor init (ITS#8424) diff --git a/mdb.c b/mdb.c index 8cbbcd11..a1eaa683 100644 --- a/mdb.c +++ b/mdb.c @@ -8518,9 +8518,11 @@ mdb_cursor_del0(MDB_cursor *mc) } if (mc->mc_db->md_flags & MDB_DUPSORT) { MDB_node *node = NODEPTR(m3->mc_pg[m3->mc_top], m3->mc_ki[m3->mc_top]); - if (node->mn_flags & F_DUPDATA) { + /* If this node is a fake page, it needs to be reinited + * because its data has moved. + */ + if ((node->mn_flags & (F_DUPDATA|F_SUBDATA)) == F_DUPDATA) { mdb_xcursor_init1(m3, node); - m3->mc_xcursor->mx_cursor.mc_flags |= C_DEL; } } }