bump ncruces/go-sqlite3 to v0.20.2 (#3524)

This commit is contained in:
kim
2024-11-07 00:16:28 +00:00
committed by GitHub
parent b84637801a
commit 45e1609377
27 changed files with 963 additions and 311 deletions

View File

@ -78,19 +78,15 @@ type memDB struct {
// +checklocks:dataMtx
data []*[sectorSize]byte
// +checklocks:dataMtx
size int64
// +checklocks:lockMtx
shared int32
// +checklocks:lockMtx
reserved bool
// +checklocks:lockMtx
pending bool
// +checklocks:memoryMtx
refs int
refs int32
shared int32 // +checklocks:lockMtx
pending bool // +checklocks:lockMtx
reserved bool // +checklocks:lockMtx
lockMtx sync.Mutex
dataMtx sync.RWMutex
@ -253,12 +249,12 @@ func (m *memFile) Unlock(lock vfs.LockLevel) error {
m.lockMtx.Lock()
defer m.lockMtx.Unlock()
if m.pending && m.lock >= vfs.LOCK_PENDING {
m.pending = false
}
if m.reserved && m.lock >= vfs.LOCK_RESERVED {
if m.lock >= vfs.LOCK_RESERVED {
m.reserved = false
}
if m.lock >= vfs.LOCK_PENDING {
m.pending = false
}
if lock < vfs.LOCK_SHARED {
m.shared--
}