From: dan Date: Wed, 10 Feb 2021 19:40:47 +0000 (+0000) Subject: Fix a longstanding problem causing an RBU vacuum to omit releasing some locks before... X-Git-Tag: version-3.35.0~102^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=513c9a1ff3600b5be3b2fcbb6081c8f88293b7fe;p=thirdparty%2Fsqlite.git Fix a longstanding problem causing an RBU vacuum to omit releasing some locks before finishing. FossilOrigin-Name: cb5bdf82fe0f90922dc34202be9d0aa34d899afff4200456623765da2877ca41 --- diff --git a/ext/rbu/sqlite3rbu.c b/ext/rbu/sqlite3rbu.c index a402174461..c5f809848d 100644 --- a/ext/rbu/sqlite3rbu.c +++ b/ext/rbu/sqlite3rbu.c @@ -4842,11 +4842,10 @@ static int rbuVfsShmLock(sqlite3_file *pFile, int ofst, int n, int flags){ if( pRbu && pRbu->eStage==RBU_STAGE_CAPTURE ){ bCapture = 1; } - if( bCapture==0 || 0==(flags & SQLITE_SHM_UNLOCK) ){ rc = p->pReal->pMethods->xShmLock(p->pReal, ofst, n, flags); if( bCapture && rc==SQLITE_OK ){ - pRbu->mLock |= (1 << ofst); + pRbu->mLock |= ((1<pShmNode; + assert( p->exclMask==0 && p->sharedMask==0 ); assert( pShmNode==pDbFd->pInode->pShmNode ); assert( pShmNode->pInode==pDbFd->pInode );