]> git.sur5r.net Git - openldap/commitdiff
Comment ovpage code in mdb_cursor_put()
authorHallvard Furuseth <hallvard@openldap.org>
Tue, 10 May 2016 05:11:44 +0000 (07:11 +0200)
committerHoward Chu <hyc@openldap.org>
Wed, 15 Jun 2016 10:30:22 +0000 (11:30 +0100)
libraries/liblmdb/mdb.c

index 0ac5abbff7a7d93467738c45a701e281c8e04e94..fdba20fe6418f5465db78fd16e888e4668b7c31f 100644 (file)
@@ -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);