mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
mdb_drop0(): Omit scanning DUPSORT sub-DB leaves
This commit is contained in:
parent
f702e33b6c
commit
b6ac0cd90a
1 changed files with 4 additions and 2 deletions
|
|
@ -9470,8 +9470,10 @@ mdb_drop0(MDB_cursor *mc, int subs)
|
||||||
MDB_cursor mx;
|
MDB_cursor mx;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
/* LEAF2 pages have no nodes, cannot have sub-DBs */
|
/* DUPSORT sub-DBs have no ovpages/DBs. Omit scanning leaves.
|
||||||
if (IS_LEAF2(mc->mc_pg[mc->mc_top]))
|
* This also avoids any P_LEAF2 pages, which have no nodes.
|
||||||
|
*/
|
||||||
|
if (mc->mc_flags & C_SUB)
|
||||||
mdb_cursor_pop(mc);
|
mdb_cursor_pop(mc);
|
||||||
|
|
||||||
mdb_cursor_copy(mc, &mx);
|
mdb_cursor_copy(mc, &mx);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue