mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Avoid automatically rolling back the transaction if an SQLITE_IOERR or SQLITE_FULL error occurs within sqlite3_db_cacheflush().
FossilOrigin-Name: 370b5d520c6523526988d0db5299f1bd09567782
This commit is contained in:
20
src/pager.c
20
src/pager.c
@@ -4477,9 +4477,10 @@ static int pagerStress(void *p, PgHdr *pPg){
|
||||
** Flush all unreferenced dirty pages to disk.
|
||||
*/
|
||||
int sqlite3PagerFlush(Pager *pPager){
|
||||
int rc = SQLITE_OK;
|
||||
int rc = pPager->errCode;
|
||||
PgHdr *pList = sqlite3PcacheDirtyList(pPager->pPCache);
|
||||
|
||||
assert( assert_pager_state(pPager) );
|
||||
while( rc==SQLITE_OK && pList ){
|
||||
PgHdr *pNext = pList->pDirty;
|
||||
if( pList->nRef==0 ){
|
||||
@@ -6093,14 +6094,17 @@ int sqlite3PagerSync(Pager *pPager, const char *zMaster){
|
||||
** returned.
|
||||
*/
|
||||
int sqlite3PagerExclusiveLock(Pager *pPager){
|
||||
int rc = SQLITE_OK;
|
||||
assert( pPager->eState==PAGER_WRITER_CACHEMOD
|
||||
|| pPager->eState==PAGER_WRITER_DBMOD
|
||||
|| pPager->eState==PAGER_WRITER_LOCKED
|
||||
);
|
||||
int rc = pPager->errCode;
|
||||
assert( assert_pager_state(pPager) );
|
||||
if( 0==pagerUseWal(pPager) ){
|
||||
rc = pager_wait_on_lock(pPager, EXCLUSIVE_LOCK);
|
||||
if( rc==SQLITE_OK ){
|
||||
assert( pPager->eState==PAGER_WRITER_CACHEMOD
|
||||
|| pPager->eState==PAGER_WRITER_DBMOD
|
||||
|| pPager->eState==PAGER_WRITER_LOCKED
|
||||
);
|
||||
assert( assert_pager_state(pPager) );
|
||||
if( 0==pagerUseWal(pPager) ){
|
||||
rc = pager_wait_on_lock(pPager, EXCLUSIVE_LOCK);
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user