SQLite

Check-in [2e5741f774]
Login

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

Overview
Comment:Fix a crash that could follow an OOM condition.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | sorter-coalesce-writes
Files: files | file ages | folders
SHA1: 2e5741f774248abc678b50711c43e38ca30c9091
User & Date: dan 2012-08-06 19:12:17.500
Context
2012-08-06
19:28
Merge the sorter-coalesce-writes branch into the trunk. This improves CREATE INDEX performance on some platforms. (check-in: e1e9cb08b0 user: dan tags: trunk)
19:12
Fix a crash that could follow an OOM condition. (Closed-Leaf check-in: 2e5741f774 user: dan tags: sorter-coalesce-writes)
18:50
When reusing pages as part of creating a new index, allocate the leaves from each free-list trunk page in ascending order, instead of trying to maximize localization for each individual allocation. This increases the chance that pages will be written to disk in ascending order by a large CREATE INDEX statement, improving overall performance. (check-in: d045f8b2d4 user: dan tags: sorter-coalesce-writes)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbesort.c.
915
916
917
918
919
920
921

922
923
924
925
926
927
928
929
930

      /* Open the second temp file, if it is not already open. */
      if( pTemp2==0 ){
        assert( iWrite2==0 );
        rc = vdbeSorterOpenTempFile(db, &pTemp2);
      }


      rc = fileWriterInit(db, pTemp2, &writer, iWrite2);

      if( rc==SQLITE_OK ){
        rc = fileWriterWriteVarint(&writer, nWrite);
      }

      if( rc==SQLITE_OK ){
        int bEof = 0;
        while( rc==SQLITE_OK && bEof==0 ){







>
|
|







915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931

      /* Open the second temp file, if it is not already open. */
      if( pTemp2==0 ){
        assert( iWrite2==0 );
        rc = vdbeSorterOpenTempFile(db, &pTemp2);
      }

      if( rc==SQLITE_OK ){
        rc = fileWriterInit(db, pTemp2, &writer, iWrite2);
      }
      if( rc==SQLITE_OK ){
        rc = fileWriterWriteVarint(&writer, nWrite);
      }

      if( rc==SQLITE_OK ){
        int bEof = 0;
        while( rc==SQLITE_OK && bEof==0 ){