mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 01:34:14 +08:00
lmdb: ITS#8109 fix mdb_cursor_del0 on empty DB.
Change-Id: Idba0acfd64b597f2bc5cb847ca99fe4560eed875
This commit is contained in:
parent
1cab8ed564
commit
d4bddde7aa
1
CHANGES
1
CHANGES
@ -7,6 +7,7 @@ LMDB 0.9.15 Release Engineering
|
|||||||
Fix mdb_rebalance collapsing root (ITS#8062)
|
Fix mdb_rebalance collapsing root (ITS#8062)
|
||||||
Fix mdb_load with large values (ITS#8066)
|
Fix mdb_load with large values (ITS#8066)
|
||||||
Fix to retry writes on EINTR (ITS#8106)
|
Fix to retry writes on EINTR (ITS#8106)
|
||||||
|
Fix mdb_cursor_del on empty DB (ITS#8109)
|
||||||
Added workaround for fdatasync bug in ext3fs
|
Added workaround for fdatasync bug in ext3fs
|
||||||
Build
|
Build
|
||||||
Don't use -fPIC for static lib
|
Don't use -fPIC for static lib
|
||||||
|
7
mdb.c
7
mdb.c
@ -8569,6 +8569,13 @@ mdb_cursor_del0(MDB_cursor *mc)
|
|||||||
MDB_cursor *m2, *m3;
|
MDB_cursor *m2, *m3;
|
||||||
MDB_dbi dbi = mc->mc_dbi;
|
MDB_dbi dbi = mc->mc_dbi;
|
||||||
|
|
||||||
|
/* DB is totally empty now, just bail out.
|
||||||
|
* Other cursors adjustments were already done
|
||||||
|
* by mdb_rebalance and aren't needed here.
|
||||||
|
*/
|
||||||
|
if (!mc->mc_snum)
|
||||||
|
return rc;
|
||||||
|
|
||||||
mp = mc->mc_pg[mc->mc_top];
|
mp = mc->mc_pg[mc->mc_top];
|
||||||
nkeys = NUMKEYS(mp);
|
nkeys = NUMKEYS(mp);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user