1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Fix a bug in the new checkpoint computation. Also update the checkpoint

algorithm in the test scripts to align with the new implementation.

FossilOrigin-Name: 8b6056f2ee596f31b157a792fac05d11f7cb63bb
This commit is contained in:
drh
2010-05-19 19:09:37 +00:00
parent 584c754d65
commit 4c1cb6ab05
4 changed files with 19 additions and 23 deletions

View File

@@ -282,8 +282,8 @@ static void walChecksumBytes(u8 *a, int nByte, u32 *aCksum){
assert( (nByte&0x00000003)==0 );
do {
s1 += (a[0]<<24) + (a[2]<<16) + (a[2]<<8) + a[3] + s2;
s2 += (a[3]<<24) + (a[5]<<16) + (a[6]<<8) + a[7] + s1;
s1 += (a[0]<<24) + (a[1]<<16) + (a[2]<<8) + a[3] + s2;
s2 += (a[4]<<24) + (a[5]<<16) + (a[6]<<8) + a[7] + s1;
a += 8;
}while( a<aEnd );
aCksum[0] = s1;