/ Check-in [1f44a9bd]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make sure all bytes of the WAL file are initialized even if the checksums are not being computed until commit due to WAL overwrite.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1f44a9bdc1577aed088d9b91882527228015dcd3
User & Date: drh 2016-01-12 02:28:19
Context
2016-01-12
04:08
Remove an unused field from the MemPage object. check-in: 5fc0a4c1 user: drh tags: trunk
02:28
Make sure all bytes of the WAL file are initialized even if the checksums are not being computed until commit due to WAL overwrite. check-in: 1f44a9bd user: drh tags: trunk
02:00
Fix an uninitialized field in the Select object when SELECTTRACE is enabled. check-in: fc628516 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/wal.c.

   704    704   
   705    705       nativeCksum = (pWal->hdr.bigEndCksum==SQLITE_BIGENDIAN);
   706    706       walChecksumBytes(nativeCksum, aFrame, 8, aCksum, aCksum);
   707    707       walChecksumBytes(nativeCksum, aData, pWal->szPage, aCksum, aCksum);
   708    708   
   709    709       sqlite3Put4byte(&aFrame[16], aCksum[0]);
   710    710       sqlite3Put4byte(&aFrame[20], aCksum[1]);
          711  +  }else{
          712  +    memset(&aFrame[8], 0, 16);
   711    713     }
   712    714   }
   713    715   
   714    716   /*
   715    717   ** Check to see if the frame with header in aFrame[] and content
   716    718   ** in aData[] is valid.  If it is a valid frame, fill *piPage and
   717    719   ** *pnTruncate and return true.  Return if the frame is not valid.