From: Hallvard Furuseth Date: Wed, 20 May 2015 02:04:38 +0000 (+0200) Subject: Set/clear mp_pad, md_pad (MDB_DUPFIXED data size). X-Git-Tag: LMDB_0.9.17~84 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3f6fa7aecec134b1c8d16186bc178c541a49d381;p=openldap Set/clear mp_pad, md_pad (MDB_DUPFIXED data size). mdb_xcursor_init1(): md_pad is only used when MDB_DUPFIXED. mdb_page_split(): Copy mp_pad too. Used by mdb_page_list(). --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 1e0579c8a7..797c67b32e 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -7157,7 +7157,7 @@ mdb_xcursor_init1(MDB_cursor *mc, MDB_node *node) mx->mx_cursor.mc_flags = C_SUB; } else { MDB_page *fp = NODEDATA(node); - mx->mx_db.md_pad = mc->mc_pg[mc->mc_top]->mp_pad; + mx->mx_db.md_pad = 0; mx->mx_db.md_flags = 0; mx->mx_db.md_depth = 1; mx->mx_db.md_branch_pages = 0; @@ -8152,6 +8152,7 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno /* Create a right sibling. */ if ((rc = mdb_page_new(mc, mp->mp_flags, 1, &rp))) return rc; + rp->mp_pad = mp->mp_pad; DPRINTF(("new right sibling: page %"Z"u", rp->mp_pgno)); if (mc->mc_snum < 2) {