aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2010-05-19 19:09:37 +0000
committerdrh <drh@noemail.net>2010-05-19 19:09:37 +0000
commit4c1cb6ab052377aed62d04eba6da4ac7ee2d3468 (patch)
treecfeeb1caa020d1f0eaf7896c1b02607b0a348b15 /src
parent584c754d6516558e7ed2a185c8d9092274d12282 (diff)
downloadsqlite-4c1cb6ab052377aed62d04eba6da4ac7ee2d3468.tar.gz
sqlite-4c1cb6ab052377aed62d04eba6da4ac7ee2d3468.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/wal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wal.c b/src/wal.c
index 1f90ce726..294d45a6f 100644
--- a/src/wal.c
+++ b/src/wal.c
@@ -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;