/ Check-in [87614b62]
Login

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

Overview
Comment:Remove a couple of incorrect assert statements so that the test suite will run with -DSQLITE_DEFAULT_CACHE_SIZE=0.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 87614b62ace530761e0e1170ec5840b212735ec6
User & Date: drh 2011-11-12 16:46:55
Context
2011-11-14
03:00
Forward port the 8-byte alignment fix from branch-3.7.9. check-in: ebf6eb6e user: drh tags: trunk
2011-11-12
16:46
Remove a couple of incorrect assert statements so that the test suite will run with -DSQLITE_DEFAULT_CACHE_SIZE=0. check-in: 87614b62 user: drh tags: trunk
15:41
Merge the windows xSyscall enhancements into trunk. check-in: c1fab9ac user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/test_pcache.c.

   157    157   
   158    158   /*
   159    159   ** Set the cache size
   160    160   */
   161    161   static void testpcacheCachesize(sqlite3_pcache *pCache, int newSize){
   162    162     testpcache *p = (testpcache*)pCache;
   163    163     assert( p->iMagic==TESTPCACHE_VALID );
   164         -  assert( newSize>=1 );
   165    164     assert( testpcacheGlobal.pDummy!=0 );
   166    165     assert( testpcacheGlobal.nInstance>0 );
   167    166   }
   168    167   
   169    168   /*
   170    169   ** Return the number of pages in the cache that are being used.
   171    170   ** This includes both pinned and unpinned pages.

Changes to src/wal.c.

  2306   2306       if( rc!=SQLITE_OK ){
  2307   2307         return rc;
  2308   2308       }
  2309   2309       nCollide = HASHTABLE_NSLOT;
  2310   2310       for(iKey=walHash(pgno); aHash[iKey]; iKey=walNextHash(iKey)){
  2311   2311         u32 iFrame = aHash[iKey] + iZero;
  2312   2312         if( iFrame<=iLast && aPgno[aHash[iKey]]==pgno ){
  2313         -        assert( iFrame>iRead );
         2313  +        /* assert( iFrame>iRead ); -- not true if there is corruption */
  2314   2314           iRead = iFrame;
  2315   2315         }
  2316   2316         if( (nCollide--)==0 ){
  2317   2317           return SQLITE_CORRUPT_BKPT;
  2318   2318         }
  2319   2319       }
  2320   2320     }

Changes to test/wal.test.

   412    412   
   413    413   # Run some "warm-body" tests to ensure that log-summary files with more
   414    414   # than 256 entries (log summaries that contain index blocks) work Ok.
   415    415   #
   416    416   do_test wal-9.1 {
   417    417     reopen_db
   418    418     execsql {
          419  +    PRAGMA cache_size=2000;
   419    420       CREATE TABLE t1(x PRIMARY KEY);
   420    421       INSERT INTO t1 VALUES(blob(900));
   421    422       INSERT INTO t1 VALUES(blob(900));
   422    423       INSERT INTO t1 SELECT blob(900) FROM t1;       /*  4 */
   423    424       INSERT INTO t1 SELECT blob(900) FROM t1;       /*  8 */
   424    425       INSERT INTO t1 SELECT blob(900) FROM t1;       /* 16 */
   425    426       INSERT INTO t1 SELECT blob(900) FROM t1;       /* 32 */
................................................................................
  1120   1121     sqlite3_simulate_device -sectorsize $sectorsize
  1121   1122     sqlite3 db test.db -vfs devsym
  1122   1123   
  1123   1124     do_test wal-17.$tn.1 {
  1124   1125       execsql {
  1125   1126         PRAGMA auto_vacuum = 0;
  1126   1127         PRAGMA page_size = 512;
         1128  +      PRAGMA cache_size = -2000;
  1127   1129         PRAGMA journal_mode = WAL;
  1128   1130         PRAGMA synchronous = FULL;
  1129   1131       }
  1130   1132       execsql {
  1131   1133         BEGIN;
  1132   1134         CREATE TABLE t(x);
  1133   1135       }