rc = mdb_cursor_open(txn, dbi, &cursor);
char seek[] = "ku.oc.repmulp\t";
key.mv_size = sizeof(seek);
key.mv_data = &seek;
mdb_cursor_get(cursor, &key, &data, MDB_SET_RANGE);
for( i = 0; i < 15; i++ ) {
mdb_cursor_del( cursor, MDB_NODUPDATA );
data.mv_size = 0;
key.mv_size = 0;
mdb_cursor_get( cursor, &key, &data,
//MDB_NEXT
MDB_GET_CURRENT
);
if( key.mv_size == 0 )
printf("WARNING 0 SIZE KEY\n");
else
printf("KEY OK: %d: %.*s\n", key.mv_size, key.mv_size,
key.mv_data);
if( data.mv_size == 0 )
printf("WARNING 0 SIZE DATA\n");
else
printf("DATA OK: %d: %.*s\n", data.mv_size,
data.mv_size, data.mv_data);
}
mdb_txn_abort(txn);