/ Check-in [15f9c271]
Login

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

Overview
Comment:Remove a testcase() macro that would require a 4GiB WAL to reach.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 15f9c2713bdfd3d6c8d8d4298f101d128e39b99a
User & Date: drh 2010-07-07 14:35:58
Context
2010-07-07
14:40
Remove two more testcase() macros that require 4GiB WAL files to hit. check-in: 16e18f27 user: drh tags: trunk
14:35
Remove a testcase() macro that would require a 4GiB WAL to reach. check-in: 15f9c271 user: drh tags: trunk
14:33
Fix a compiler warning in PRAGMA journal_mode. check-in: d94269e6 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/wal.c.

  1572   1572   
  1573   1573       /* Iterate through the contents of the WAL, copying data to the db file. */
  1574   1574       while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
  1575   1575         i64 iOffset;
  1576   1576         assert( walFramePgno(pWal, iFrame)==iDbpage );
  1577   1577         if( iFrame<=nBackfill || iFrame>mxSafeFrame ) continue;
  1578   1578         iOffset = walFrameOffset(iFrame, szPage) + WAL_FRAME_HDRSIZE;
  1579         -      /* testcase( IS_BIG_INT(iOffset) ); -- would require a 4GB WAL file */
         1579  +      /* testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL file */
  1580   1580         rc = sqlite3OsRead(pWal->pWalFd, zBuf, szPage, iOffset);
  1581   1581         if( rc!=SQLITE_OK ) break;
  1582   1582         iOffset = (iDbpage-1)*(i64)szPage;
  1583   1583         testcase( IS_BIG_INT(iOffset) );
  1584   1584         rc = sqlite3OsWrite(pWal->pDbFd, zBuf, szPage, iOffset);
  1585   1585         if( rc!=SQLITE_OK ) break;
  1586   1586       }
................................................................................
  2124   2124   
  2125   2125     /* If iRead is non-zero, then it is the log frame number that contains the
  2126   2126     ** required page. Read and return data from the log file.
  2127   2127     */
  2128   2128     if( iRead ){
  2129   2129       i64 iOffset = walFrameOffset(iRead, pWal->hdr.szPage) + WAL_FRAME_HDRSIZE;
  2130   2130       *pInWal = 1;
  2131         -    testcase( IS_BIG_INT(iOffset) );
         2131  +    /* testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL */
  2132   2132       return sqlite3OsRead(pWal->pWalFd, pOut, nOut, iOffset);
  2133   2133     }
  2134   2134   
  2135   2135     *pInWal = 0;
  2136   2136     return SQLITE_OK;
  2137   2137   }
  2138   2138