Only for #MDB_DUPSORT */
MDB_NEXT_MULTIPLE, /**< Return all duplicate data items at the next
cursor position. Only for #MDB_DUPFIXED */
- MDB_NEXT_NODUP, /**< Position at first data item of next key.
- Only for #MDB_DUPSORT */
+ MDB_NEXT_NODUP, /**< Position at first data item of next key */
MDB_PREV, /**< Position at previous data item */
MDB_PREV_DUP, /**< Position at previous data item of current key.
Only for #MDB_DUPSORT */
- MDB_PREV_NODUP, /**< Position at last data item of previous key.
- Only for #MDB_DUPSORT */
+ MDB_PREV_NODUP, /**< Position at last data item of previous key */
MDB_SET, /**< Position at specified key */
MDB_SET_KEY, /**< Position at specified key, return key + data */
MDB_SET_RANGE /**< Position at first key greater than or equal to specified key. */
printf("mdb_cursor_open failed, error %d %s\n", rc, mdb_strerror(rc));
goto txn_abort;
}
- while ((rc = mdb_cursor_get(cursor, &key, NULL, MDB_NEXT)) == 0) {
+ while ((rc = mdb_cursor_get(cursor, &key, NULL, MDB_NEXT_NODUP)) == 0) {
char *str = malloc(key.mv_size+1);
MDB_dbi db2;
memcpy(str, key.mv_data, key.mv_size);