mdbx: backport - fix mdbx_pnl_search().

This commit is contained in:
Leonid Yuriev 2018-09-22 22:48:01 +03:00
parent 912728a322
commit 337f7589f8

View File

@ -650,8 +650,8 @@ static unsigned __hot mdbx_pnl_search(MDBX_PNL pnl, pgno_t id) {
while (n > 0) { while (n > 0) {
unsigned pivot = n >> 1; unsigned pivot = n >> 1;
cursor = base + pivot + 1; cursor = base + pivot + 1;
val = MDBX_PNL_ASCENDING ? mdbx_cmp2int(pnl[cursor], id) val = MDBX_PNL_ASCENDING ? mdbx_cmp2int(id, pnl[cursor])
: mdbx_cmp2int(id, pnl[cursor]); : mdbx_cmp2int(pnl[cursor], id);
if (val < 0) { if (val < 0) {
n = pivot; n = pivot;