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

Fix a problem with checkpointing large log files created by an external process.

FossilOrigin-Name: 8f94bde568be52ecc5a976b7a09776ea7b4bb511
This commit is contained in:
dan
2010-05-07 06:59:08 +00:00
parent 846705021d
commit 998ad21271
4 changed files with 74 additions and 11 deletions

View File

@@ -398,12 +398,11 @@ static void walIndexUnmap(Wal *pWal){
** Map the wal-index file into memory if it isn't already.
**
** The reqSize parameter is the minimum required size of the mapping.
** A value of -1 means "don't care". The reqSize parameter is ignored
** if the mapping is already held.
** A value of -1 means "don't care".
*/
static int walIndexMap(Wal *pWal, int reqSize){
int rc = SQLITE_OK;
if( pWal->pWiData==0 ){
if( pWal->pWiData==0 || reqSize>pWal->szWIndex ){
rc = pWal->pVfs->xShmGet(pWal->pVfs, pWal->pWIndex, reqSize,
&pWal->szWIndex, (void**)(char*)&pWal->pWiData);
if( rc==SQLITE_OK && pWal->pWiData==0 ){