SQLite

Check-in [79d356fea6]
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
Timelines: family | ancestors | descendants | both | wal
Files: files | file ages | folders
SHA1: 79d356fea6008a8adf8ebd4906571375f3cf5213
User & Date: dan 2010-04-30 17:05:24.000
Context
2010-04-30
17:28
Remove some obsolete debugging parameters. (check-in: a012aed498 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: 79d356fea6 user: dan tags: wal)
16:50
Fix a problem with calculating the required size of the wal-index when appending frames. (check-in: 9526b11130 user: dan tags: wal)
Changes
Unified Diff 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);