Skip to content

Commit 7881fd0

Browse files
committed
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
1 parent 00515ba commit 7881fd0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/liblmdb/mdb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5878,6 +5878,8 @@ mdb_cursor_set(MDB_cursor *mc, MDB_val *key, MDB_val *data,
58785878
} else
58795879
return MDB_NOTFOUND;
58805880
}
5881+
} else {
5882+
mc->mc_pg[0] = 0;
58815883
}
58825884

58835885
rc = mdb_page_search(mc, key, 0);

0 commit comments

Comments
 (0)