/ Check-in [655d8cfc]
Login

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

Overview
Comment:Add a new sqlite3FaultSim() call to vdbePmaReaderSeek() to facilitate tests of error handling in the sorter.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | threads
Files: files | file ages | folders
SHA1: 655d8cfc752b3f5f63521a57f2155f8e14aaf7c4
User & Date: drh 2014-07-30 18:47:12
Context
2014-08-06
02:03
Merge all recent changes from trunk. check-in: a353a851 user: drh tags: threads
2014-07-30
18:47
Add a new sqlite3FaultSim() call to vdbePmaReaderSeek() to facilitate tests of error handling in the sorter. check-in: 655d8cfc user: drh tags: threads
17:21
Mark some invariants in the vdbesort.c logic when SQLITE_MAX_WORKER_THREADS==0. check-in: 721cd965 user: drh tags: threads
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to src/vdbesort.c.

619
620
621
622
623
624
625

626
627
628
629
630
631
632
  SorterFile *pFile,              /* Sorter file to read from */
  i64 iOff                        /* Offset in pFile */
){
  int rc = SQLITE_OK;

  assert( pReadr->pIncr==0 || pReadr->pIncr->bEof==0 );


  if( pReadr->aMap ){
    sqlite3OsUnfetch(pReadr->pFd, 0, pReadr->aMap);
    pReadr->aMap = 0;
  }
  pReadr->iReadOff = iOff;
  pReadr->iEof = pFile->iEof;
  pReadr->pFd = pFile->pFd;







>







619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
  SorterFile *pFile,              /* Sorter file to read from */
  i64 iOff                        /* Offset in pFile */
){
  int rc = SQLITE_OK;

  assert( pReadr->pIncr==0 || pReadr->pIncr->bEof==0 );

  if( sqlite3FaultSim(201) ) return SQLITE_IOERR_READ;
  if( pReadr->aMap ){
    sqlite3OsUnfetch(pReadr->pFd, 0, pReadr->aMap);
    pReadr->aMap = 0;
  }
  pReadr->iReadOff = iOff;
  pReadr->iEof = pFile->iEof;
  pReadr->pFd = pFile->pFd;