]> git.sur5r.net Git - openldap/commitdiff
More ITS#7589: Fix prev commit.
authorHallvard Furuseth <hallvard@openldap.org>
Sun, 19 May 2013 16:38:13 +0000 (18:38 +0200)
committerHallvard Furuseth <hallvard@openldap.org>
Sun, 19 May 2013 16:38:13 +0000 (18:38 +0200)
mp_pages gives #pages in the ovpage. OVPAGES() no longer does.

libraries/liblmdb/mdb.c

index 2c715ec74f2bbf9d7e07d8a9bef0dbcab9680073..fced10c2027aeeabfe0ed0be1abf139f390a3fe6 100644 (file)
@@ -5192,10 +5192,11 @@ current:
                        pgno_t pg;
                        int ovpages, dpages;
 
-                       ovpages = OVPAGES(NODEDSZ(leaf), mc->mc_txn->mt_env->me_psize);
                        dpages = OVPAGES(data->mv_size, mc->mc_txn->mt_env->me_psize);
                        memcpy(&pg, NODEDATA(leaf), sizeof(pg));
                        mdb_page_get(mc->mc_txn, pg, &omp);
+                       ovpages = omp->mp_pages;
+
                        /* Is the ov page writable and large enough? */
                        if ((omp->mp_flags & P_DIRTY) && ovpages >= dpages) {
                                /* yes, overwrite it. Note in this case we don't