mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Fix mdb_load append option
Use MDB_CURRENT to avoid seeking to new key when appending DUPs. Reinit cursor on new batch, if appending DUPs.
This commit is contained in:
parent
9705032618
commit
18cd6837b6
2 changed files with 9 additions and 5 deletions
4
external/db_drivers/liblmdb/mdb.c
vendored
4
external/db_drivers/liblmdb/mdb.c
vendored
|
@ -7231,7 +7231,7 @@ mdb_cursor_put(MDB_cursor *mc, MDB_val *key, MDB_val *data,
|
|||
|
||||
dkey.mv_size = 0;
|
||||
|
||||
if (flags == MDB_CURRENT) {
|
||||
if (flags & MDB_CURRENT) {
|
||||
if (!(mc->mc_flags & C_INITIALIZED))
|
||||
return EINVAL;
|
||||
rc = MDB_SUCCESS;
|
||||
|
@ -7624,7 +7624,7 @@ put_sub:
|
|||
xdata.mv_size = 0;
|
||||
xdata.mv_data = "";
|
||||
leaf = NODEPTR(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top]);
|
||||
if (flags & MDB_CURRENT) {
|
||||
if (flags == MDB_CURRENT) {
|
||||
xflags = MDB_CURRENT|MDB_NOSPILL;
|
||||
} else {
|
||||
mdb_xcursor_init1(mc, leaf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue