1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Further improvements to showwal.c: Reset the checksum after each frame so that

only individual checksum failures are shown.  And only show failures, not
correct checksums.

FossilOrigin-Name: 4e2bf57549a8d50fc0993386c724eb4a2b35c9fe
This commit is contained in:
drh
2013-01-25 15:31:44 +00:00
parent d63ce044d1
commit 03c41c0bc9
3 changed files with 13 additions and 8 deletions

View File

@ -231,8 +231,13 @@ static void print_oneline_frame(int iFrame, Cksum *pCksum){
getInt32(aData+12),
s0,
s1,
(s0==pCksum->s0 && s1==pCksum->s1) ? "cksum-ok" : "cksum-fail"
(s0==pCksum->s0 && s1==pCksum->s1) ? "" : "cksum-fail"
);
/* Reset the checksum so that a single frame checksum failure will not
** cause all subsequent frames to also show a failure. */
pCksum->s0 = s0;
pCksum->s1 = s1;
free(aData);
}