bugfix for mdb_cursor_put with MDB_MULTIPLE

If the variable dkey.mv_size is non-zero, then it means dkey
contains some original data which has to be put back in the
child db, typically when the child db has just been created.

But when using MDB_MULTIPLE, if this variable has not been
reset to zero, we may come back to this section and wrongly
think that there is some original data to be taken care of.
vmware
Claude Brisson 12 years ago committed by Howard Chu
parent 77001f549b
commit bbb27cde4a
  1. 2
      libraries/liblmdb/mdb.c

@ -5218,6 +5218,8 @@ put_sub:
} }
} }
} }
/* we've done our job */
dkey.mv_size = 0;
} }
if (flags & MDB_APPENDDUP) if (flags & MDB_APPENDDUP)
xflags |= MDB_APPEND; xflags |= MDB_APPEND;

Loading…
Cancel
Save