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

Overview
Comment:Fix a bug in compressed database mode causing an incorrect page number to be assigned to a page record when the end of the previous record is aligned with the end of a database block.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | range-delete-fixes
Files: files | file ages | folders
SHA1: e6a71a85836f18dc33db98e926eb4269812676f1
User & Date: dan 2012-11-05 10:23:54.362
Context
2012-11-05
14:33
Before writing data to a new database segment, make sure the data is held in heap (not mmap'd) memory. Otherwise, the write may cause the file to grow and the mapping to be released and remapped, leaving an invalid pointer. Leaf check-in: 3ba1c3f589 user: dan tags: range-delete-fixes
10:23
Fix a bug in compressed database mode causing an incorrect page number to be assigned to a page record when the end of the previous record is aligned with the end of a database block. check-in: e6a71a8583 user: dan tags: range-delete-fixes
2012-11-03
19:51
Fix a problem in writing free-list entries to the LSM. check-in: b3b4c58d9a user: dan tags: range-delete-fixes
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/lsm_file.c.
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
          rc = lsmEnvWrite(pFS->pEnv, pFS->fdDb, iWrite-4, aPtr, sizeof(aPtr));
          if( nRem>0 ) iApp = iWrite;
        }
      }else{
        /* The next block is already allocated. */
        assert( nRem>0 );
        rc = fsBlockNext(pFS, fsPageToBlock(pFS, iApp), &iBlk);
        iApp = fsFirstPageOnBlock(pFS, iBlk);
      }

      /* Write the remaining data into the new block */
      if( rc==LSM_OK && nRem>0 ){
        rc = lsmEnvWrite(pFS->pEnv, pFS->fdDb, iApp, &aData[nWrite], nRem);
        iApp += nRem;
      }







|







1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
          rc = lsmEnvWrite(pFS->pEnv, pFS->fdDb, iWrite-4, aPtr, sizeof(aPtr));
          if( nRem>0 ) iApp = iWrite;
        }
      }else{
        /* The next block is already allocated. */
        assert( nRem>0 );
        rc = fsBlockNext(pFS, fsPageToBlock(pFS, iApp), &iBlk);
        iRet = iApp = fsFirstPageOnBlock(pFS, iBlk);
      }

      /* Write the remaining data into the new block */
      if( rc==LSM_OK && nRem>0 ){
        rc = lsmEnvWrite(pFS->pEnv, pFS->fdDb, iApp, &aData[nWrite], nRem);
        iApp += nRem;
      }