mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 18:04:13 +08:00
mdbx: minor refine mdbx_page_check()
.
Change-Id: I325c20fe042635a0641cc24f5661408f3476139b
This commit is contained in:
parent
44089b03df
commit
d50fff8410
@ -15363,7 +15363,7 @@ static __cold int mdbx_page_check(MDBX_cursor *const mc,
|
||||
if (IS_OVERFLOW(mp)) {
|
||||
if (unlikely(mp->mp_pages < 1 && mp->mp_pages >= MAX_PAGENO / 2))
|
||||
return bad_page(mp, "invalid overflow n-pages (%u)\n", mp->mp_pages);
|
||||
if (unlikely(mp->mp_pgno > mc->mc_txn->mt_next_pgno - mp->mp_pages))
|
||||
if (unlikely(mp->mp_pgno + mp->mp_pages > mc->mc_txn->mt_next_pgno))
|
||||
return bad_page(mp, "overflow page beyond (%u) next-pgno\n",
|
||||
mp->mp_pgno + mp->mp_pages);
|
||||
return MDBX_SUCCESS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user