mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Make sure xShmGet is never called while already holding the shared-memory
segment. FossilOrigin-Name: 92ebdbc5f64ac63796ff56c1e1aec3b95c6bdd20
This commit is contained in:
@@ -419,6 +419,7 @@ static void walIndexUnmap(Wal *pWal){
|
||||
static int walIndexMap(Wal *pWal, int reqSize){
|
||||
int rc = SQLITE_OK;
|
||||
if( pWal->pWiData==0 || reqSize>pWal->szWIndex ){
|
||||
walIndexUnmap(pWal);
|
||||
rc = sqlite3OsShmGet(pWal->pDbFd, reqSize, &pWal->szWIndex,
|
||||
(void**)(char*)&pWal->pWiData);
|
||||
if( rc==SQLITE_OK && pWal->pWiData==0 ){
|
||||
|
Reference in New Issue
Block a user