mdbx: возвращение ключа при MDBX_GET_MULTIPLE для единообразия C++ API.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2024-09-18 07:46:19 +03:00
parent 29d0a96818
commit f738552721

View File

@ -2176,9 +2176,16 @@ __hot int cursor_ops(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
rc = cursor_seek(mc, key, data, MDBX_SET).err; rc = cursor_seek(mc, key, data, MDBX_SET).err;
if (unlikely(rc != MDBX_SUCCESS)) if (unlikely(rc != MDBX_SUCCESS))
return rc; return rc;
} else {
if (unlikely(is_eof(mc) || !inner_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);
}
} }
if (unlikely(is_eof(mc) || !inner_filled(mc)))
return MDBX_ENODATA;
goto fetch_multiple; goto fetch_multiple;
case MDBX_NEXT_MULTIPLE: case MDBX_NEXT_MULTIPLE: