Skip to content

Commit

Permalink
Return error message in throw error
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Apr 30, 2024
1 parent d728d28 commit fca18a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dependencies/lmdb/libraries/liblmdb/mdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -4426,6 +4426,8 @@ mdb_freelist_save(MDB_txn *txn)
rc = mdb_cursor_get(&mc, &key, NULL, MDB_SET);
if (rc == 0 && key.mv_size != sizeof(txn->mt_txnid)) {
fprintf(stderr, "new freelist entry key wrong size %u\n", txn->mt_txnid);
last_error = malloc(100);
sprintf(last_error, "new freelist entry key wrong size %u\n", txn->mt_txnid);
rc = MDB_BAD_TXN;
}
if (rc == MDB_NOTFOUND) rc = 0;
Expand All @@ -4439,6 +4441,8 @@ mdb_freelist_save(MDB_txn *txn)
while (rc == 0) {
if (key.mv_size != sizeof(start_written)) {
fprintf(stderr, "updated freelist key wrong size between %u and %u, last %u\n", start_written, env->me_freelist_written_end, last);
last_error = malloc(100);
sprintf(last_error, "updated freelist key wrong size between %u and %u, last %u\n", start_written, env->me_freelist_written_end, last);
rc = MDB_BAD_TXN;
break;
}
Expand Down

0 comments on commit fca18a9

Please sign in to comment.