mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
When walTryBeginRead() encounters an I/O error trying to set a lock
(as opposed to SQLITE_BUSY) be sure to propagate that error back up the call stack. FossilOrigin-Name: aa2c2b67a7f50c97a44cca1af5c437bf5410869c
This commit is contained in:
@@ -1783,8 +1783,11 @@ static int walTryBeginRead(Wal *pWal, int *pChanged, int useWal, int cnt){
|
||||
if( rc==SQLITE_OK ){
|
||||
pInfo->aReadMark[1] = pWal->hdr.mxFrame+1;
|
||||
walUnlockExclusive(pWal, WAL_READ_LOCK(1), 1);
|
||||
rc = WAL_RETRY;
|
||||
}else if( rc==SQLITE_BUSY ){
|
||||
rc = WAL_RETRY;
|
||||
}
|
||||
return WAL_RETRY;
|
||||
return rc;
|
||||
}else{
|
||||
if( mxReadMark < pWal->hdr.mxFrame ){
|
||||
for(i=1; i<WAL_NREADER; i++){
|
||||
@@ -1794,6 +1797,8 @@ static int walTryBeginRead(Wal *pWal, int *pChanged, int useWal, int cnt){
|
||||
mxI = i;
|
||||
walUnlockExclusive(pWal, WAL_READ_LOCK(i), 1);
|
||||
break;
|
||||
}else if( rc!=SQLITE_BUSY ){
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user