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:
697e00a
)
Fix dupsort fetch
author
Howard Chu
<hyc@symas.com>
Fri, 19 Aug 2011 02:30:54 +0000
(19:30 -0700)
committer
Howard Chu
<hyc@symas.com>
Thu, 1 Sep 2011 23:31:10 +0000
(16:31 -0700)
libraries/libmdb/mdb.c
patch
|
blob
|
history
diff --git
a/libraries/libmdb/mdb.c
b/libraries/libmdb/mdb.c
index
135c103
..
6baf055
100644
(file)
--- a/
libraries/libmdb/mdb.c
+++ b/
libraries/libmdb/mdb.c
@@
-2008,7
+2008,8
@@
mdb_cursor_set(MDB_cursor *cursor, MDB_val *key, MDB_val *data,
cursor->mc_eof = 0;
if (data) {
- if ((rc = mdb_read_data(cursor->mc_txn, leaf, data)) != MDB_SUCCESS)
+ MDB_val d2;
+ if ((rc = mdb_read_data(cursor->mc_txn, leaf, &d2)) != MDB_SUCCESS)
return rc;
if (cursor->mc_txn->mt_dbs[cursor->mc_dbi].md_flags & MDB_DUPSORT) {
@@
-2029,7
+2030,10
@@
mdb_cursor_set(MDB_cursor *cursor, MDB_val *key, MDB_val *data,
if (rc != MDB_SUCCESS)
return rc;
}
+ } else {
+ *data = d2;
}
+
}
rc = mdb_set_key(leaf, key);