Issue ID: 9447
Summary: Defining MDB_DEBUG has no effect
Target Milestone: ---
I tried to compile mdb.c with -DMDB_DEBUG=2 to get some debug output, but
nothing was written.
Looking at mdb.c it looks as if the code block that sets the mdb_debug static
flag should be moved to above the line that does txn->mt_txnid++; (since
mt_txnid is unsigned and mdb_debug_start starts out as zero and is never
changed, so txn->mt_txnid+1 would never be zero unless it wraps around or is
initialized to (size_t)-1 somewhere).
Moving the code block does indeed cause a lot of debug messages to be written.
This is lmdb 5b75edb6337b28669c1370bc33442e272e72f91a but looking at the git
history it looks as if the code has been the same since mdb_debug was
introduced so perhaps the code never worked.
The code at
if (txn->mt_txnid == mdb_debug_start)
mdb_debug = 1;
(I am new to the code and to lmdb so apologies if I missed something obvious.)
You are receiving this mail because:
You are on the CC list for the issue.