/ Check-in [b369980f]
Login

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

Overview
Comment:Improvements to a comment in the pcache.c file. No changes to code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b369980f0c4550a9034833caa2c7c85d6030f5ff
User & Date: drh 2016-05-13 17:22:33
Context
2016-05-16
11:55
Disable shell.exe test cases for UTF8 filenames as they do not work on MinGW. check-in: 386bcbba user: drh tags: trunk
2016-05-13
17:22
Improvements to a comment in the pcache.c file. No changes to code. check-in: b369980f user: drh tags: trunk
15:22
Remove the unused PGHDR_NEED_READ flag. Add invariant checking (during SQLITE_DEBUG builds only) for the PgHdr object. check-in: 771c5411 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pcache.c.

   125    125     **    (1)  Page X is journalled, and gets WRITEABLE and NEED_SEEK.
   126    126     **    (2)  Page X moved to freelist, WRITEABLE is cleared
   127    127     **    (3)  Page X reused, WRITEABLE is set again
   128    128     ** If NEED_SYNC had been cleared in step 2, then it would not be reset
   129    129     ** in step 3, and page might be written into the database without first
   130    130     ** syncing the rollback journal, which might cause corruption on a power
   131    131     ** loss.
          132  +  **
          133  +  ** Another example is when the database page size is smaller than the
          134  +  ** disk sector size.  When any page of a sector is journalled, all pages
          135  +  ** in that sector are marked NEED_SYNC even if they are still CLEAN, just
          136  +  ** in case they are later modified, since all pages in the same sector
          137  +  ** must be journalled and synced before any of those pages can be safely
          138  +  ** written.
   132    139     */
   133    140     return 1;
   134    141   }
   135    142   #endif /* SQLITE_DEBUG */
   136    143   
   137    144   
   138    145   /********************************** Linked List Management ********************/