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:
0f842a2
)
ITS#7701 fix mdb_rebalance
author
Howard Chu
<hyc@symas.com>
Sat, 21 Sep 2013 21:37:11 +0000
(14:37 -0700)
committer
Howard Chu
<hyc@symas.com>
Sat, 21 Sep 2013 21:37:11 +0000
(14:37 -0700)
Must copy tmp cursor back to real cursor when merging into tmp cursor.
libraries/liblmdb/mdb.c
patch
|
blob
|
history
diff --git
a/libraries/liblmdb/mdb.c
b/libraries/liblmdb/mdb.c
index 9c5e7389de17f0d71764ac048b80fa44796e7583..e5313b0c8516609aa9d78e423f93743127a2b325 100644
(file)
--- a/
libraries/liblmdb/mdb.c
+++ b/
libraries/liblmdb/mdb.c
@@
-7248,8
+7248,11
@@
mdb_rebalance(MDB_cursor *mc)
else {
if (mc->mc_ki[ptop] == 0)
rc = mdb_page_merge(&mn, mc);
- else
+ else {
+ mn.mc_ki[mn.mc_top] += mc->mc_ki[mn.mc_top] + 1;
rc = mdb_page_merge(mc, &mn);
+ mdb_cursor_copy(&mn, mc);
+ }
mc->mc_flags &= ~(C_INITIALIZED|C_EOF);
}
return rc;