1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Make sure WAL alway requests enough shared-memory space.

FossilOrigin-Name: 138f128317b6695530ca3fde7be4cdf22548cd22
This commit is contained in:
drh
2010-05-31 14:39:31 +00:00
parent 4222441dee
commit 18b7f604aa
3 changed files with 12 additions and 12 deletions

View File

@@ -1696,7 +1696,7 @@ static int walTryBeginRead(Wal *pWal, int *pChanged, int useWal){
}
}
}else{
rc = walIndexMap(pWal, pWal->hdr.mxFrame);
rc = walIndexMap(pWal, walMappingSize(pWal->hdr.mxFrame));
}
if( rc!=SQLITE_OK ){
return rc;
@@ -1995,7 +1995,7 @@ int sqlite3WalBeginWriteTransaction(Wal *pWal){
** time the read transaction on this connection was started, then
** the write is disallowed.
*/
rc = walIndexMap(pWal, pWal->hdr.mxFrame);
rc = walIndexMap(pWal, walMappingSize(pWal->hdr.mxFrame));
if( rc ){
walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);
pWal->writeLock = 0;