From: Howard Chu Date: Mon, 23 Nov 2015 18:30:24 +0000 (+0000) Subject: ITS#8321 Fix mdb_cursor_set X-Git-Tag: LMDB_0.9.17~11 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7881fd0fa7dbfc427c2176716d1b62ece319a960;p=openldap ITS#8321 Fix mdb_cursor_set Always reinit mc_pg[0] if cursor is not C_INITIALIZED It might have a stale value when using nested txns --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 307cb4bf7f..7b5e099534 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -5878,6 +5878,8 @@ mdb_cursor_set(MDB_cursor *mc, MDB_val *key, MDB_val *data, } else return MDB_NOTFOUND; } + } else { + mc->mc_pg[0] = 0; } rc = mdb_page_search(mc, key, 0);