diff --git a/mdb.c b/mdb.c index 9e91807f..4479e531 100644 --- a/mdb.c +++ b/mdb.c @@ -5754,8 +5754,10 @@ set2: if (leaf == NULL) { mdb_debug("===> inexact leaf not found, goto sibling"); - if ((rc = mdb_cursor_sibling(mc, 1)) != MDB_SUCCESS) + if ((rc = mdb_cursor_sibling(mc, 1)) != MDB_SUCCESS) { + mc->mc_flags |= C_EOF; return rc; /* no entries matched */ + } mp = mc->mc_pg[mc->mc_top]; mdb_cassert(mc, IS_LEAF(mp)); leaf = NODEPTR(mp, 0);