mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx: return MDBX_ENODATA
instead of MDBX_EINVAL
for non-positioned/EOF cursor and MDBX_GET_CURRENT
.
Change-Id: I2adf76f8f662e77e5a6aa077344fab6b430975c4
This commit is contained in:
parent
c55f99073b
commit
5f09ec73c9
@ -12384,7 +12384,7 @@ int mdbx_cursor_get(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
|
||||
switch (op) {
|
||||
case MDBX_GET_CURRENT: {
|
||||
if (unlikely(!(mc->mc_flags & C_INITIALIZED)))
|
||||
return MDBX_EINVAL;
|
||||
return MDBX_ENODATA;
|
||||
MDBX_page *mp = mc->mc_pg[mc->mc_top];
|
||||
const unsigned nkeys = page_numkeys(mp);
|
||||
if (mc->mc_ki[mc->mc_top] >= nkeys) {
|
||||
|
Loading…
Reference in New Issue
Block a user