mdbx: исправление GET_MULTIPLE для специальных случаев и/или одного значения.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2024-11-27 11:49:53 +03:00
parent 81a8127084
commit 76c9b42e86

View File

@ -2184,15 +2184,22 @@ __hot int cursor_ops(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
if (unlikely(rc != MDBX_SUCCESS))
return rc;
} else {
if (unlikely(is_eof(mc) || !inner_filled(mc)))
if (unlikely(!is_filled(mc)))
return MDBX_ENODATA;
cASSERT(mc, is_filled(mc));
if (key) {
const page_t *mp = mc->pg[mc->top];
const node_t *node = page_node(mp, mc->ki[mc->top]);
*key = get_key(node);
}
}
cASSERT(mc, is_filled(mc));
if (unlikely(!inner_filled(mc))) {
if (inner_pointed(mc))
return MDBX_ENODATA;
const page_t *mp = mc->pg[mc->top];
const node_t *node = page_node(mp, mc->ki[mc->top]);
return node_read(mc, node, data, mp);
}
goto fetch_multiple;
case MDBX_NEXT_MULTIPLE: