/ Check-in [d9a5f44f]
Login

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

Overview
Comment:Fix handling of errors returned by the SQLITE_FCNTL_OMIT_SYNCED file-control.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | zipvfs-multifile-commit
Files: files | file ages | folders
SHA1: d9a5f44f4a27336d41e60b6c3791bd018fbbff6f
User & Date: dan 2013-12-10 16:27:59
Context
2013-12-10
16:35
Merge changes from the trunk. check-in: 3ee736a3 user: dan tags: zipvfs-multifile-commit
16:27
Fix handling of errors returned by the SQLITE_FCNTL_OMIT_SYNCED file-control. check-in: d9a5f44f user: dan tags: zipvfs-multifile-commit
2013-12-09
20:42
Modify the way some internal file-controls are invoked. In order to support multi-file transactions in the zipvfs extension. check-in: 32fb1784 user: dan tags: zipvfs-multifile-commit
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pager.c.

  6016   6016     int rc = SQLITE_OK;
  6017   6017   
  6018   6018     if( isOpen(pPager->fd) ){
  6019   6019       void *pArg = (void*)zMaster;
  6020   6020       rc = sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_SYNC_OMITTED, pArg);
  6021   6021       if( rc==SQLITE_NOTFOUND ) rc = SQLITE_OK;
  6022   6022     }
  6023         -  if( !pPager->noSync ){
         6023  +  if( rc==SQLITE_OK && !pPager->noSync ){
  6024   6024       assert( !MEMDB );
  6025   6025       rc = sqlite3OsSync(pPager->fd, pPager->syncFlags);
  6026   6026     }
  6027   6027     return rc;
  6028   6028   }
  6029   6029   
  6030   6030   /*
................................................................................
  6346   6346       }
  6347   6347     }else{
  6348   6348       rc = pager_playback(pPager, 0);
  6349   6349     }
  6350   6350   
  6351   6351     assert( pPager->eState==PAGER_READER || rc!=SQLITE_OK );
  6352   6352     assert( rc==SQLITE_OK || rc==SQLITE_FULL || rc==SQLITE_CORRUPT
  6353         -          || rc==SQLITE_NOMEM || (rc&0xFF)==SQLITE_IOERR );
         6353  +          || rc==SQLITE_NOMEM || (rc&0xFF)==SQLITE_IOERR 
         6354  +          || rc==SQLITE_CANTOPEN
         6355  +  );
  6354   6356   
  6355   6357     /* If an error occurs during a ROLLBACK, we can no longer trust the pager
  6356   6358     ** cache. So call pager_error() on the way out to make any error persistent.
  6357   6359     */
  6358   6360     return pager_error(pPager, rc);
  6359   6361   }
  6360   6362