mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-20 05:08:21 +08:00
mdbx: minor fix cursor_on_first/last for empty sub-db.
Change-Id: I68c2e1bd28e62c9512bf8ef711fe21573e3450b9
This commit is contained in:
parent
4ea2bea22e
commit
21bbba82fb
@ -18615,7 +18615,7 @@ int mdbx_cursor_on_first(const MDBX_cursor *mc) {
|
||||
: MDBX_EBADSIGN;
|
||||
|
||||
if (!(mc->mc_flags & C_INITIALIZED))
|
||||
return MDBX_RESULT_FALSE;
|
||||
return mc->mc_db->md_entries ? MDBX_RESULT_FALSE : MDBX_RESULT_TRUE;
|
||||
|
||||
for (unsigned i = 0; i < mc->mc_snum; ++i) {
|
||||
if (mc->mc_ki[i])
|
||||
@ -18634,7 +18634,7 @@ int mdbx_cursor_on_last(const MDBX_cursor *mc) {
|
||||
: MDBX_EBADSIGN;
|
||||
|
||||
if (!(mc->mc_flags & C_INITIALIZED))
|
||||
return MDBX_RESULT_FALSE;
|
||||
return mc->mc_db->md_entries ? MDBX_RESULT_FALSE : MDBX_RESULT_TRUE;
|
||||
|
||||
for (unsigned i = 0; i < mc->mc_snum; ++i) {
|
||||
unsigned nkeys = page_numkeys(mc->mc_pg[i]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user