From: Hallvard Furuseth Date: Sun, 10 Sep 2017 22:00:14 +0000 (+0200) Subject: Tweak ITS#8722 fix: Use XCURSOR_REFRESH() X-Git-Tag: LMDB_0.9.22~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f6514da36080efb8876d274c1d01d9c9207335f7;p=openldap Tweak ITS#8722 fix: Use XCURSOR_REFRESH() This checks XCURSOR_INITED() and fixes the mn_flags check. --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 7f6c536341..e31867de82 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -7084,13 +7084,7 @@ mdb_cursor_del(MDB_cursor *mc, unsigned int flags) if (m2 == mc || m2->mc_snum < mc->mc_snum) continue; if (!(m2->mc_flags & C_INITIALIZED)) continue; if (m2->mc_pg[mc->mc_top] == mp) { - MDB_node *n2 = leaf; - if (m2->mc_ki[mc->mc_top] >= NUMKEYS(mp)) continue; - if (m2->mc_ki[mc->mc_top] != mc->mc_ki[mc->mc_top]) { - n2 = NODEPTR(mp, m2->mc_ki[mc->mc_top]); - if (n2->mn_flags & F_SUBDATA) continue; - } - m2->mc_xcursor->mx_cursor.mc_pg[0] = NODEDATA(n2); + XCURSOR_REFRESH(m2, mc->mc_top, mp); } } }