mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
ITS#7553 better fix
This commit is contained in:
parent
8a99b00acc
commit
863fa77a08
@ -6403,7 +6403,7 @@ mdb_rebalance(MDB_cursor *mc)
|
||||
static int
|
||||
mdb_cursor_del0(MDB_cursor *mc, MDB_node *leaf)
|
||||
{
|
||||
int rc, eof;
|
||||
int rc;
|
||||
|
||||
/* add overflow pages to free list */
|
||||
if (!IS_LEAF2(mc->mc_pg[mc->mc_top]) && F_ISSET(leaf->mn_flags, F_BIGDATA)) {
|
||||
@ -6421,11 +6421,11 @@ mdb_cursor_del0(MDB_cursor *mc, MDB_node *leaf)
|
||||
}
|
||||
mdb_node_del(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top], mc->mc_db->md_pad);
|
||||
mc->mc_db->md_entries--;
|
||||
eof = mc->mc_flags & C_EOF;
|
||||
rc = mdb_rebalance(mc);
|
||||
if (rc != MDB_SUCCESS)
|
||||
mc->mc_txn->mt_flags |= MDB_TXN_ERROR;
|
||||
else if (eof)
|
||||
/* if mc points past last node in page, invalidate */
|
||||
else if (mc->mc_ki[mc->mc_top] >= NUMKEYS(mc->mc_pg[mc->mc_top]))
|
||||
mc->mc_flags &= ~C_INITIALIZED;
|
||||
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user