From 09e74f9056191a0d0370731118411d74a195aa5d Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Tue, 10 May 2016 07:11:44 +0200 Subject: [PATCH] Comment ovpage code in mdb_cursor_put() --- libraries/liblmdb/mdb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 0ac5abbff7..fdba20fe64 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -6635,8 +6635,13 @@ current: /* Note - this page is already counted in parent's dirty_room */ rc2 = mdb_mid2l_insert(mc->mc_txn->mt_u.dirty_list, &id2); mdb_cassert(mc, rc2 == 0); + /* Currently we make the page look as with put() in the + * parent txn, in case the user peeks at MDB_RESERVEd + * or unused parts. Some users treat ovpages specially. + */ if (!(flags & MDB_RESERVE)) { - /* Copy end of page, adjusting alignment so + /* Skip the part where LMDB will put *data. + * Copy end of page, adjusting alignment so * compiler may copy words instead of bytes. */ off = (PAGEHDRSZ + data->mv_size) & -sizeof(size_t); -- 2.39.5