diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pager.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pager.c b/src/pager.c index 7182f34e6..03fd077da 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1978,6 +1978,14 @@ static int pager_playback(Pager *pPager, int isHot){ rc = SQLITE_OK; pPager->journalOff = szJ; break; + }else if( rc==SQLITE_IOERR_SHORT_READ ){ + /* If the journal has been truncated, simply stop reading and + ** processing the journal. This might happen if the journal was + ** not completely written and synced prior to a crash. In that + ** case, the database should have never been written in the + ** first place so it is OK to simply abandon the rollback. */ + rc = SQLITE_OK; + goto end_playback; }else{ /* If we are unable to rollback, quit and return the error ** code. This will cause the pager to enter the error state |