mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:14:14 +08:00
lmdb: Omit scanning DUPSORT sub-DB leaves in mdb_drop0().
Change-Id: Icc670a81210a9160e6cb90b9442994c008f599bd
This commit is contained in:
parent
b13d850bd7
commit
b3a3dc4c6b
6
mdb.c
6
mdb.c
@ -9277,8 +9277,10 @@ mdb_drop0(MDB_cursor *mc, int subs)
|
||||
MDB_cursor mx;
|
||||
unsigned i;
|
||||
|
||||
/* LEAF2 pages have no nodes, cannot have sub-DBs */
|
||||
if (IS_LEAF2(mc->mc_pg[mc->mc_top]))
|
||||
/* DUPSORT sub-DBs have no ovpages/DBs. Omit scanning leaves.
|
||||
* This also avoids any P_LEAF2 pages, which have no nodes.
|
||||
*/
|
||||
if (mc->mc_flags & C_SUB)
|
||||
mdb_cursor_pop(mc);
|
||||
|
||||
mdb_cursor_copy(mc, &mx);
|
||||
|
Loading…
x
Reference in New Issue
Block a user