Skip to content

Commit

Permalink
Tolerate duplicate values and discard them
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Feb 4, 2025
1 parent e764d2c commit e6f7ba0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dependencies/lmdb/libraries/liblmdb/mdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -3007,8 +3007,10 @@ mdb_page_alloc(MDB_cursor *mc, int num, MDB_page **mp)
/* Merge in descending sorted order */
//fprintf(stderr, "Merging %u: ", last);
//mdb_midl_print(stderr, idl);
if ((rc = mdb_midl_xmerge(&mop, idl)) != 0)
goto fail;
if ((rc = mdb_midl_xmerge(&mop, idl)) != 0) {
if (rc == -1) rc = 0; // ignore duplicate value errors and just ignore the duplicates
else goto fail;
}
if (mop != env->me_pghead) env->me_pghead = mop;
mop_len = mop[0];
}
Expand Down

0 comments on commit e6f7ba0

Please sign in to comment.