/ Check-in [c1daa809]
Login

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

Overview
Comment:Fix an assert() in the merge-sort logic to account for I/O errors.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c1daa809a17a97610e51f9babd90f36908921245
User & Date: drh 2011-08-15 15:37:15
Context
2011-08-15
19:44
Updated comments on the multiplexor extension. No changes to code. check-in: 0f42ef69 user: drh tags: trunk
15:37
Fix an assert() in the merge-sort logic to account for I/O errors. check-in: c1daa809 user: drh tags: trunk
15:27
New makefile target "sqlite3-debug.c" builds an amalgamation that include appropriate "#line" macros relating the code back to the original source files. check-in: 26f2da24 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbesort.c.

   537    537     i64 nByte = 0;                  /* Total bytes in all opened PMAs */
   538    538   
   539    539     /* Initialize the iterators. */
   540    540     for(i=0; rc==SQLITE_OK && i<SORTER_MAX_MERGE_COUNT; i++){
   541    541       VdbeSorterIter *pIter = &pSorter->aIter[i];
   542    542       rc = vdbeSorterIterInit(db, pSorter, pSorter->iReadOff, pIter, &nByte);
   543    543       pSorter->iReadOff = pIter->iEof;
   544         -    assert( pSorter->iReadOff<=pSorter->iWriteOff );
          544  +    assert( pSorter->iReadOff<=pSorter->iWriteOff || rc!=SQLITE_OK );
   545    545       if( pSorter->iReadOff>=pSorter->iWriteOff ) break;
   546    546     }
   547    547   
   548    548     /* Initialize the aTree[] array. */
   549    549     for(i=pSorter->nTree-1; rc==SQLITE_OK && i>0; i--){
   550    550       rc = vdbeSorterDoCompare(pCsr, i);
   551    551     }