/ Check-in [69d749d9]
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:Make sure the in-journal boolean vector is cleared and released when ending a transaction. This fixes an obscure problem with the previous check-in.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 69d749d93d6565b848ce5c07f2738d144c6564bf
User & Date: drh 2010-03-19 16:52:54
Context
2010-03-19
16:55
Store the SQLite version number of the last writer in bytes 96..99 of the header. check-in: 146d4f5d user: drh tags: trunk
16:52
Make sure the in-journal boolean vector is cleared and released when ending a transaction. This fixes an obscure problem with the previous check-in. check-in: 69d749d9 user: drh tags: trunk
15:48
Do not create, open, or initialize the rollback journal until something actually needs to be written into the journal. That way, expensive filesystem operations are avoided if the transaction ends up being a no-op. check-in: b78e58ae user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pager.c.

  1310   1310           rc = sqlite3OsDelete(pPager->pVfs, pPager->zJournal, 0);
  1311   1311         }
  1312   1312       }
  1313   1313   
  1314   1314   #ifdef SQLITE_CHECK_PAGES
  1315   1315       sqlite3PcacheIterateDirty(pPager->pPCache, pager_set_pagehash);
  1316   1316   #endif
  1317         -
  1318         -    sqlite3BitvecDestroy(pPager->pInJournal);
  1319         -    pPager->pInJournal = 0;
  1320         -    pPager->nRec = 0;
  1321   1317     }
         1318  +  sqlite3BitvecDestroy(pPager->pInJournal);
         1319  +  pPager->pInJournal = 0;
         1320  +  pPager->nRec = 0;
  1322   1321     sqlite3PcacheCleanAll(pPager->pPCache);
  1323   1322   
  1324   1323     if( !pPager->exclusiveMode ){
  1325   1324       rc2 = osUnlock(pPager->fd, SHARED_LOCK);
  1326   1325       pPager->state = PAGER_SHARED;
  1327   1326       pPager->changeCountDone = 0;
  1328   1327     }else if( pPager->state==PAGER_SYNCED ){