projects
/
platform
/
upstream
/
lmdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f702e33
)
mdb_drop0(): Omit scanning DUPSORT sub-DB leaves
author
Hallvard Furuseth
<hallvard@openldap.org>
Sat, 4 Jul 2015 11:48:02 +0000
(13:48 +0200)
committer
Hallvard Furuseth
<hallvard@openldap.org>
Sat, 4 Jul 2015 11:48:02 +0000
(13:48 +0200)
libraries/liblmdb/mdb.c
patch
|
blob
|
history
diff --git
a/libraries/liblmdb/mdb.c
b/libraries/liblmdb/mdb.c
index
7cf5294
..
1de63e2
100644
(file)
--- a/
libraries/liblmdb/mdb.c
+++ b/
libraries/liblmdb/mdb.c
@@
-9470,8
+9470,10
@@
mdb_drop0(MDB_cursor *mc, int subs)
MDB_cursor mx;
unsigned int 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);