Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Revert to allowing a cache spill during writes of multiple pages within a single sector as long as the spill does not require a journal sync and a new journal header. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
7d83fbae9802a56b2121d0775de54fcc |
User & Date: | drh 2010-06-24 18:36:33.000 |
Context
2010-06-24
| ||
19:16 | Add test cases to pager1.test and pagerfault.test. (check-in: 4941e437d2 user: dan tags: trunk) | |
18:36 | Revert to allowing a cache spill during writes of multiple pages within a single sector as long as the spill does not require a journal sync and a new journal header. (check-in: 7d83fbae98 user: drh tags: trunk) | |
17:37 | Modify ctime.test to work with SQLITE_THREADSAFE=2. (check-in: c6db3b3031 user: dan tags: trunk) | |
Changes
Changes to src/pager.c.
︙ | |||
301 302 303 304 305 306 307 | 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | - + - - - - - + + + + + + + | ** then attempts to upgrade to an exclusive lock. If this attempt ** fails, then SQLITE_BUSY may be returned to the user and the user ** may attempt to commit the transaction again later (calling ** CommitPhaseOne() again). This flag is used to ensure that the ** master journal name is only written to the journal file the first ** time CommitPhaseOne() is called. ** |
︙ | |||
352 353 354 355 356 357 358 359 360 361 362 363 364 365 | 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | + | u8 state; /* PAGER_UNLOCK, _SHARED, _RESERVED, etc. */ u8 dbModified; /* True if there are any changes to the Db */ u8 needSync; /* True if an fsync() is needed on the journal */ u8 journalStarted; /* True if header of journal is synced */ u8 changeCountDone; /* Set after incrementing the change-counter */ u8 setMaster; /* True if a m-j name has been written to jrnl */ u8 doNotSpill; /* Do not spill the cache when non-zero */ u8 doNotSyncSpill; /* Do not do a spill that requires jrnl sync */ u8 dbSizeValid; /* Set when dbSize is correct */ u8 subjInMemory; /* True to use in-memory sub-journals */ Pgno dbSize; /* Number of pages in the database */ Pgno dbOrigSize; /* dbSize before the current transaction */ Pgno dbFileSize; /* Number of pages in the database file */ int errCode; /* One of several kinds of errors */ int nRec; /* Pages journalled since last j-header written */ |
︙ | |||
3514 3515 3516 3517 3518 3519 3520 | 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 | - - - - + + + + + + + - + - - + + + | static int pagerStress(void *p, PgHdr *pPg){ Pager *pPager = (Pager *)p; int rc = SQLITE_OK; assert( pPg->pPager==pPager ); assert( pPg->flags&PGHDR_DIRTY ); |
︙ | |||
4830 4831 4832 4833 4834 4835 4836 | 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 | - - + + + - - + + | if( nPagePerSector>1 ){ Pgno nPageCount; /* Total number of pages in database file */ Pgno pg1; /* First page of the sector pPg is located on. */ int nPage; /* Number of pages starting at pg1 to journal */ int ii; /* Loop counter */ int needSync = 0; /* True if any page has PGHDR_NEED_SYNC */ |
︙ | |||
4897 4898 4899 4900 4901 4902 4903 | 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 | - - + + | pPage->flags |= PGHDR_NEED_SYNC; sqlite3PagerUnref(pPage); } } assert(pPager->needSync); } |
︙ |