/ Check-in [743bf1f1]
Login

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

Overview
Comment:Do not preserve the btreeInitPage() results in PRAGMA integrity_check if there were cell sizing errors because PRAGMA cell_size_check was turned off during the btreeInitPage() call.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 743bf1f184be316971f2e9c651bcf573bde8654a
User & Date: drh 2015-07-04 11:14:20
Context
2015-07-04
15:35
Fix a problem in the fts5 integrity-check. check-in: 4e473559 user: dan tags: trunk
11:14
Do not preserve the btreeInitPage() results in PRAGMA integrity_check if there were cell sizing errors because PRAGMA cell_size_check was turned off during the btreeInitPage() call. check-in: 743bf1f1 user: drh tags: trunk
00:04
Sync up Makefile clean targets for FTS5. check-in: 43ead44e user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  8955   8955     u32 usableSize;          /* Usable size of the page */
  8956   8956     u32 contentOffset;       /* Offset to the start of the cell content area */
  8957   8957     u32 *heap = 0;           /* Min-heap used for checking cell coverage */
  8958   8958     u32 x, prev = 0;         /* Next and previous entry on the min-heap */
  8959   8959     const char *saved_zPfx = pCheck->zPfx;
  8960   8960     int saved_v1 = pCheck->v1;
  8961   8961     int saved_v2 = pCheck->v2;
         8962  +  u8 savedIsInit;
  8962   8963   
  8963   8964     /* Check that the page exists
  8964   8965     */
  8965   8966     pBt = pCheck->pBt;
  8966   8967     usableSize = pBt->usableSize;
  8967   8968     if( iPage==0 ) return 0;
  8968   8969     if( checkRef(pCheck, iPage) ) return 0;
................................................................................
  8972   8973       checkAppendMsg(pCheck,
  8973   8974          "unable to get the page. error code=%d", rc);
  8974   8975       goto end_of_check;
  8975   8976     }
  8976   8977   
  8977   8978     /* Clear MemPage.isInit to make sure the corruption detection code in
  8978   8979     ** btreeInitPage() is executed.  */
         8980  +  savedIsInit = pPage->isInit;
  8979   8981     pPage->isInit = 0;
  8980   8982     if( (rc = btreeInitPage(pPage))!=0 ){
  8981   8983       assert( rc==SQLITE_CORRUPT );  /* The only possible error from InitPage */
  8982   8984       checkAppendMsg(pCheck,
  8983   8985                      "btreeInitPage() returns error code %d", rc);
  8984   8986       goto end_of_check;
  8985   8987     }
................................................................................
  9164   9166         checkAppendMsg(pCheck,
  9165   9167             "Fragmentation of %d bytes reported as %d on page %d",
  9166   9168             nFrag, data[hdr+7], iPage);
  9167   9169       }
  9168   9170     }
  9169   9171   
  9170   9172   end_of_check:
         9173  +  if( !doCoverageCheck ) pPage->isInit = savedIsInit;
  9171   9174     releasePage(pPage);
  9172   9175     pCheck->zPfx = saved_zPfx;
  9173   9176     pCheck->v1 = saved_v1;
  9174   9177     pCheck->v2 = saved_v2;
  9175   9178     return depth+1;
  9176   9179   }
  9177   9180   #endif /* SQLITE_OMIT_INTEGRITY_CHECK */