From: Howard Chu Date: Tue, 7 Jul 2015 12:41:32 +0000 (+0100) Subject: ITS#8190 fix cursor EOF bug X-Git-Tag: LMDB_0.9.16~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7513bd4618959ded9cf8f7a9f7e58283a7671b6f;p=openldap ITS#8190 fix cursor EOF bug --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 6bdf3151dc..7129741e91 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -5725,8 +5725,10 @@ set2: if (leaf == NULL) { DPUTS("===> 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);