/ Check-in [7499f743]
Login

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

Overview
Comment:Updates to a comment to keep it in alignment to the changes on this branch.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | deferred-free-space
Files: files | file ages | folders
SHA3-256: 7499f74351415e601eb48eff6b6fccd3a78d137f5ea9cd7cac46b904772966de
User & Date: drh 2019-02-11 12:51:39
Context
2019-02-11
17:22
Fix test cases. Avoid unnecessary tests for MemPage.nFree less than zero. check-in: 480a5090 user: drh tags: deferred-free-space
12:51
Updates to a comment to keep it in alignment to the changes on this branch. check-in: 7499f743 user: drh tags: deferred-free-space
2019-02-09
22:33
Fix a page-cache reference leak in the btree balancer when there is a corrupt database. check-in: 92858991 user: drh tags: deferred-free-space
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  1429   1429     ** or fewer fragmented bytes. In this case it is faster to move the
  1430   1430     ** two (or one) blocks of cells using memmove() and add the required
  1431   1431     ** offsets to each pointer in the cell-pointer array than it is to 
  1432   1432     ** reconstruct the entire page.  */
  1433   1433     if( (int)data[hdr+7]<=nMaxFrag ){
  1434   1434       int iFree = get2byte(&data[hdr+1]);
  1435   1435   
  1436         -    /* If the initial freeblock offset were out of bounds, that would
  1437         -    ** have been detected by btreeInitPage() when it was computing the
         1436  +    /* If the initial freeblock offset were out of bounds, that would have
         1437  +    ** been detected by btreeComputeFreeSpace() when it was computing the
  1438   1438       ** number of free bytes on the page. */
  1439   1439       assert( iFree<=usableSize-4 );
  1440   1440       if( iFree ){
  1441   1441         int iFree2 = get2byte(&data[iFree]);
  1442   1442         if( iFree2>usableSize-4 ) return SQLITE_CORRUPT_PAGE(pPage);
  1443   1443         if( 0==iFree2 || (data[iFree2]==0 && data[iFree2+1]==0) ){
  1444   1444           u8 *pEnd = &data[cellOffset + nCell*2];