SQLite
Diff
Not logged in

Differences From Artifact [4f218660]:

To Artifact [044c2731]:


  1974   1974         }
  1975   1975         rc = pager_playback_one_page(pPager,1,isUnsync,&pPager->journalOff,0,0);
  1976   1976         if( rc!=SQLITE_OK ){
  1977   1977           if( rc==SQLITE_DONE ){
  1978   1978             rc = SQLITE_OK;
  1979   1979             pPager->journalOff = szJ;
  1980   1980             break;
         1981  +        }else if( rc==SQLITE_IOERR_SHORT_READ ){
         1982  +          /* If the journal has been truncated, simply stop reading and
         1983  +          ** processing the journal. This might happen if the journal was
         1984  +          ** not completely written and synced prior to a crash.  In that
         1985  +          ** case, the database should have never been written in the
         1986  +          ** first place so it is OK to simply abandon the rollback. */
         1987  +          rc = SQLITE_OK;
         1988  +          goto end_playback;
  1981   1989           }else{
  1982   1990             /* If we are unable to rollback, quit and return the error
  1983   1991             ** code.  This will cause the pager to enter the error state
  1984   1992             ** so that no further harm will be done.  Perhaps the next
  1985   1993             ** process to come along will be able to rollback the database.
  1986   1994             */
  1987   1995             goto end_playback;