mdbx: fix intenals for mdbx_get_equal_or_great().

Change-Id: I7b44df14c6f9ede4844d53e28c1b34d84fc664fa
This commit is contained in:
Leonid Yuriev 2020-10-23 23:16:07 +03:00
parent 1db0a6fc92
commit 7522246ccd

View File

@ -12132,7 +12132,7 @@ static int mdbx_cursor_set(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
if (!mc->mc_top) {
/* There are no other pages */
mc->mc_ki[mc->mc_top] = 0;
if (op == MDBX_SET_RANGE && exactp == &stub_exactp) {
if (op == MDBX_SET_RANGE) {
rc = 0;
goto set1;
} else
@ -12151,7 +12151,7 @@ static int mdbx_cursor_set(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
set2:
node = mdbx_node_search(mc, &aligned_key, exactp);
if (exactp != &stub_exactp && !*exactp) {
if (!*exactp && !(op == MDBX_SET_RANGE || op == MDBX_GET_BOTH_RANGE)) {
/* MDBX_SET specified and not an exact match. */
return MDBX_NOTFOUND;
}