Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch pager-dev Excluding Merge-Ins
This is equivalent to a diff from 3bfd2621d1 to ad601c7962
2016-05-12
| ||
12:08 | For in-memory databases, it does not matter if pcache entries are marked "clean" or "writable". (check-in: 06c1e27ca8 user: drh tags: trunk) | |
09:48 | Add a missing OPTIMIZATION-IF-FALSE comment to pcache.c. (check-in: bc202e5b41 user: dan tags: trunk) | |
2016-05-11
| ||
23:54 | For in-memory databases, it does not matter if pcache entries are marked "clean" or "writable". (Closed-Leaf check-in: ad601c7962 user: drh tags: pager-dev) | |
20:03 | Remove a redundant condition from pcache.c. Add an OPTIMIZATION-IF-TRUE comment to another condition that requires it. (check-in: 3bfd2621d1 user: dan tags: trunk) | |
15:41 | Remove some a small amount of redundant code related to PCache.pSynced from pcache.c. (check-in: 9cc8cad78f user: dan tags: trunk) | |
Changes to src/pager.c.
︙ | ︙ | |||
2029 2030 2031 2032 2033 2034 2035 | } #endif sqlite3BitvecDestroy(pPager->pInJournal); pPager->pInJournal = 0; pPager->nRec = 0; if( rc==SQLITE_OK ){ | | | 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 | } #endif sqlite3BitvecDestroy(pPager->pInJournal); pPager->pInJournal = 0; pPager->nRec = 0; if( rc==SQLITE_OK ){ if( pagerFlushOnCommit(pPager) ){ sqlite3PcacheCleanAll(pPager->pPCache); }else{ sqlite3PcacheClearWritable(pPager->pPCache); } sqlite3PcacheTruncate(pPager->pPCache, pPager->dbSize); } |
︙ | ︙ |
Changes to src/pcache.c.
︙ | ︙ | |||
10 11 12 13 14 15 16 | ** ************************************************************************* ** This file implements that page cache. */ #include "sqliteInt.h" /* | | > > > > > > | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ** ************************************************************************* ** This file implements that page cache. */ #include "sqliteInt.h" /* ** A complete page cache is an instance of this structure. Every ** entry in the cache holds a single page of the database file. The ** btree layer only operates on the cached copy of the database pages. ** ** A page cache entry is "clean" if it exactly matches what is currently ** on disk. A page is "dirty" if it has been modified and needs to be ** persisted to disk. ** ** pDirty, pDirtyTail, pSynced: ** All dirty pages are linked into the doubly linked list using ** PgHdr.pDirtyNext and pDirtyPrev. The list is maintained in LRU order ** such that p was added to the list more recently than p->pDirtyNext. ** PCache.pDirty points to the first (newest) element in the list and ** pDirtyTail to the last (oldest). |
︙ | ︙ |
Changes to src/pcache.h.
︙ | ︙ | |||
22 23 24 25 26 27 28 | ** Every page in the cache is controlled by an instance of the following ** structure. */ struct PgHdr { sqlite3_pcache_page *pPage; /* Pcache object page handle */ void *pData; /* Page data */ void *pExtra; /* Extra content */ | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | ** Every page in the cache is controlled by an instance of the following ** structure. */ struct PgHdr { sqlite3_pcache_page *pPage; /* Pcache object page handle */ void *pData; /* Page data */ void *pExtra; /* Extra content */ PgHdr *pDirty; /* Transient list of dirty sorted by pgno */ Pager *pPager; /* The pager this page is part of */ Pgno pgno; /* Page number for this page */ #ifdef SQLITE_CHECK_PAGES u32 pageHash; /* Hash of page content */ #endif u16 flags; /* PGHDR flags defined below */ |
︙ | ︙ |