/ Check-in [40f80ffe]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix another bug in walClearHash().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 40f80ffe70ca691dfa146f6d84956ed0784fc63d
User & Date: dan 2010-05-21 19:15:05
Context
2010-05-22
00:55
Add several EXPENSIVE_ASSERT code blocks to validate the wal-index hash table. Fix the bugs that these code blocks fine. Rename walClearHash() to walCleanupHash() and simplify its interface. check-in: 7aade899 user: drh tags: trunk
2010-05-21
19:15
Fix another bug in walClearHash(). check-in: 40f80ffe user: dan tags: trunk
18:24
Comment out the SQLITE_FCNTL_SIZE_HINT from os_unix.c since it does not seem to provide any performance gain there. check-in: 7d01309d user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/wal.c.

1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
    u32 iZero;                              /* frame == (aHash[x]+iZero) */
    int iLimit;                             /* Zero values greater than this */

    walHashFind(pWal, iNewMx+1, &aHash, &unused1, &iZero);
    iLimit = iNewMx - iZero;
    if( iLimit>0 ){
      int i;                      /* Used to iterate through aHash[] */
      for(i=0; i<HASHTABLE_NPAGE; i++){
        if( aHash[i]>iLimit ){
          aHash[i] = 0;
        }
      }
    }
  }
}







|







1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
    u32 iZero;                              /* frame == (aHash[x]+iZero) */
    int iLimit;                             /* Zero values greater than this */

    walHashFind(pWal, iNewMx+1, &aHash, &unused1, &iZero);
    iLimit = iNewMx - iZero;
    if( iLimit>0 ){
      int i;                      /* Used to iterate through aHash[] */
      for(i=0; i<HASHTABLE_NSLOT; i++){
        if( aHash[i]>iLimit ){
          aHash[i] = 0;
        }
      }
    }
  }
}