1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-25 20:58:26 +03:00

Use the difference between the SQLITE_IOERR_SHORT_READ and SQLITE_IOERR_READ

returns from sqlite3OsRead() to make decisions about what to do with the
error. (CVS 3503)

FossilOrigin-Name: 6324ea811eec1200cee89e6f377368eaf2fcda77
This commit is contained in:
drh
2006-11-06 21:20:25 +00:00
parent 382765866b
commit 551b77365e
8 changed files with 39 additions and 37 deletions

View File

@@ -1026,7 +1026,7 @@ static int unixRead(OsFile *id, void *pBuf, int amt){
TRACE5("READ %-3d %5d %7d %d\n", ((unixFile*)id)->h, got,
last_page, TIMER_ELAPSED);
SEEK(0);
SimulateIOError( got=0 );
SimulateIOError( got = -1 );
if( got==amt ){
return SQLITE_OK;
}else if( got<0 ){