SQLite

Changes On Branch shm-lock-fix
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch shm-lock-fix Excluding Merge-Ins

This is equivalent to a diff from bd1e9e0a to fb36ac4d

2021-02-11
16:19
In RBU, avoid passing VFS xShmLock calls through to the underlying VFS in cases where xShmMap calls may not be. This fixes a bad interaction with ZipVFS. (Leaf check-in: 0c3838d9 user: dan tags: reuse-schema-3.31)
2021-02-10
20:00
Fix a longstanding problem causing an RBU vacuum to omit releasing some locks before finishing. (check-in: 66c07a07 user: dan tags: trunk)
19:49
Remove an assert() added by the previous commit that is sometimes false. (Closed-Leaf check-in: fb36ac4d user: dan tags: shm-lock-fix)
19:40
Fix a longstanding problem causing an RBU vacuum to omit releasing some locks before finishing. (check-in: cb5bdf82 user: dan tags: shm-lock-fix)
17:31
In RBU, avoid passing VFS xShmLock calls through to the underlying VFS in cases where xShmMap calls may not be. This fixes a bad interaction with ZipVFS. (check-in: bd1e9e0a user: dan tags: trunk)
2021-02-08
15:56
Correctly detect correlated subqueries when resolving names in RETURNING clauses. (check-in: b43cfa04 user: drh tags: trunk)

Changes to ext/rbu/sqlite3rbu.c.

4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849

4850
4851
4852
4853
4854
4855
4856
4838
4839
4840
4841
4842
4843
4844

4845
4846
4847

4848
4849
4850
4851
4852
4853
4854
4855







-



-
+







    ** segments. */
    if( ofst==WAL_LOCK_CKPT && n==1 ) rc = SQLITE_BUSY;
  }else{
    int bCapture = 0;
    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<<n) - 1) << ofst;
      }
    }
  }

  return rc;
}