DESC Make sure all references to transaction IDs are properly handled EDESC Transaction IDs are unsigned and always greater than 0. There was a bug that might cause it to be negative because the mmap was casted to a signed integer and not to an unsigned one. Besides, start from 0 instead of 1; there's no reason to begin with 1. Note that the number stored in the lockfile is the maximum number in use, 0 meaning there are no transactions in course. But for no reason a transaction can have a tid 0.