/ Check-in [79d356fe]
Login

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

Overview
Comment:Fix a problem with resizing the wal-index mapping after the mapping has been extended by an external process.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | wal
Files: files | file ages | folders
SHA1: 79d356fea6008a8adf8ebd4906571375f3cf5213
User & Date: dan 2010-04-30 17:05:24
Context
2010-04-30
17:28
Remove some obsolete debugging parameters. check-in: a012aed4 user: drh tags: wal
17:05
Fix a problem with resizing the wal-index mapping after the mapping has been extended by an external process. check-in: 79d356fe user: dan tags: wal
16:50
Fix a problem with calculating the required size of the wal-index when appending frames. check-in: 9526b111 user: dan tags: wal
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/wal.c.

922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
    rc = walIndexReadHdr(pWal, pChanged);
    if( rc!=SQLITE_OK ){
      /* An error occured while attempting log recovery. */
      sqlite3WalCloseSnapshot(pWal);
    }else{
      /* Check if the mapping needs to grow. */
      if( pWal->hdr.iLastPg 
       && walIndexEntry(pWal->hdr.iLastPg)>=pWal->szWIndex
      ){
         walIndexRemap(pWal, -1);
      }
    }
  }

  walIndexUnmap(pWal);







|







922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
    rc = walIndexReadHdr(pWal, pChanged);
    if( rc!=SQLITE_OK ){
      /* An error occured while attempting log recovery. */
      sqlite3WalCloseSnapshot(pWal);
    }else{
      /* Check if the mapping needs to grow. */
      if( pWal->hdr.iLastPg 
       && walIndexEntry(pWal->hdr.iLastPg)*sizeof(u32)>=pWal->szWIndex
      ){
         walIndexRemap(pWal, -1);
      }
    }
  }

  walIndexUnmap(pWal);