|
|
@ -5803,8 +5803,8 @@ retry: |
|
|
|
id3.mref = 1; |
|
|
|
id3.mref = 1; |
|
|
|
if (id3.mid) |
|
|
|
if (id3.mid) |
|
|
|
goto found; |
|
|
|
goto found; |
|
|
|
/* don't map past last written page */ |
|
|
|
/* don't map past last written page in read-only envs */ |
|
|
|
if (pgno + MDB_RPAGE_CHUNK-1 > txn->mt_last_pgno) |
|
|
|
if ((env->me_flags & MDB_RDONLY) && pgno + MDB_RPAGE_CHUNK-1 > txn->mt_last_pgno) |
|
|
|
id3.mcnt = txn->mt_last_pgno + 1 - pgno; |
|
|
|
id3.mcnt = txn->mt_last_pgno + 1 - pgno; |
|
|
|
else |
|
|
|
else |
|
|
|
id3.mcnt = MDB_RPAGE_CHUNK; |
|
|
|
id3.mcnt = MDB_RPAGE_CHUNK; |
|
|
|