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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user