From e4ce404992f440adf0a5b026932b8cfd392bfa35 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sun, 19 May 2013 18:38:13 +0200 Subject: [PATCH] More ITS#7589: Fix prev commit. mp_pages gives #pages in the ovpage. OVPAGES() no longer does. --- libraries/liblmdb/mdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 2c715ec..fced10c 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -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