mirror of https://github.com/sqlite/sqlite
Fix over-length source code lines in pager.c.
FossilOrigin-Name: 14de3d39267a4005a0fa900bab4adc4c104e4084
This commit is contained in:
parent
ef648698c8
commit
e399ac2e1e
14
manifest
14
manifest
|
@ -1,5 +1,5 @@
|
|||
C Fix\sminor\sproblems\sin\sthe\sota\sdemo\sapplication.
|
||||
D 2015-06-29T15:41:50.815
|
||||
C Fix\sover-length\ssource\scode\slines\sin\spager.c.
|
||||
D 2015-06-29T18:14:02.529
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 285a0a234ed7610d431d91671c136098c2bd86a9
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
|
@ -314,7 +314,7 @@ F src/os_setup.h c9d4553b5aaa6f73391448b265b89bed0b890faa
|
|||
F src/os_unix.c 23eb5f56fac54d8fe0cb204291f3b3b2d94f23fc
|
||||
F src/os_win.c 27cc135e2d0b8b1e2e4944db1e2669a6a18fa0f8
|
||||
F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca
|
||||
F src/pager.c 7e745749c375e3c35ef92051e2c1f7425cfcb3de
|
||||
F src/pager.c 81099edb051a46330cb4f526aaa782ac31d5f576
|
||||
F src/pager.h c3476e7c89cdf1c6914e50a11f3714e30b4e0a77
|
||||
F src/parse.y 6d60dda8f8d418b6dc034f1fbccd816c459983a8
|
||||
F src/pcache.c 994f15b465337a079feb04aac34c199dbc610247
|
||||
|
@ -1364,7 +1364,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
|
|||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
|
||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||
P ab7aeeead395a05b91a921ef9ebe9252fffad667
|
||||
R cf8c1f0870ca2f41a49b1e8959952d21
|
||||
U dan
|
||||
Z 5ca3fbc5a6a82f3d1d52496384d0d8e0
|
||||
P 6aaaec6e63cdf713b0d67e24a892088ff251c82a
|
||||
R 00b6fa5674088c81a24f73d93b973d9c
|
||||
U drh
|
||||
Z 08a04bd3dea2dc293fe05f9e7c08921e
|
||||
|
|
|
@ -1 +1 @@
|
|||
6aaaec6e63cdf713b0d67e24a892088ff251c82a
|
||||
14de3d39267a4005a0fa900bab4adc4c104e4084
|
47
src/pager.c
47
src/pager.c
|
@ -456,9 +456,9 @@ struct PagerSavepoint {
|
|||
/*
|
||||
** Bits of the Pager.doNotSpill flag. See further description below.
|
||||
*/
|
||||
#define SPILLFLAG_OFF 0x01 /* Never spill cache. Set via pragma */
|
||||
#define SPILLFLAG_ROLLBACK 0x02 /* Current rolling back, so do not spill */
|
||||
#define SPILLFLAG_NOSYNC 0x04 /* Spill is ok, but do not sync */
|
||||
#define SPILLFLAG_OFF 0x01 /* Never spill cache. Set via pragma */
|
||||
#define SPILLFLAG_ROLLBACK 0x02 /* Current rolling back, so do not spill */
|
||||
#define SPILLFLAG_NOSYNC 0x04 /* Spill is ok, but do not sync */
|
||||
|
||||
/*
|
||||
** An open page cache is an instance of struct Pager. A description of
|
||||
|
@ -540,11 +540,11 @@ struct PagerSavepoint {
|
|||
** while it is being traversed by code in pager_playback(). The SPILLFLAG_OFF
|
||||
** case is a user preference.
|
||||
**
|
||||
** If the SPILLFLAG_NOSYNC bit is set, writing to the database from pagerStress()
|
||||
** is permitted, but syncing the journal file is not. This flag is set
|
||||
** by sqlite3PagerWrite() when the file-system sector-size is larger than
|
||||
** the database page-size in order to prevent a journal sync from happening
|
||||
** in between the journalling of two pages on the same sector.
|
||||
** If the SPILLFLAG_NOSYNC bit is set, writing to the database from
|
||||
** pagerStress() is permitted, but syncing the journal file is not.
|
||||
** This flag is set by sqlite3PagerWrite() when the file-system sector-size
|
||||
** is larger than the database page-size in order to prevent a journal sync
|
||||
** from happening in between the journalling of two pages on the same sector.
|
||||
**
|
||||
** subjInMemory
|
||||
**
|
||||
|
@ -647,7 +647,7 @@ struct Pager {
|
|||
u8 doNotSpill; /* Do not spill the cache when non-zero */
|
||||
u8 subjInMemory; /* True to use in-memory sub-journals */
|
||||
u8 bUseFetch; /* True to use xFetch() */
|
||||
u8 hasBeenUsed; /* True if any content previously read from this pager*/
|
||||
u8 hasBeenUsed; /* True if any content previously read */
|
||||
Pgno dbSize; /* Number of pages in the database */
|
||||
Pgno dbOrigSize; /* dbSize before the current transaction */
|
||||
Pgno dbFileSize; /* Number of pages in the database file */
|
||||
|
@ -1657,7 +1657,8 @@ static int writeMasterJournal(Pager *pPager, const char *zMaster){
|
|||
|| (0 != (rc = sqlite3OsWrite(pPager->jfd, zMaster, nMaster, iHdrOff+4)))
|
||||
|| (0 != (rc = write32bits(pPager->jfd, iHdrOff+4+nMaster, nMaster)))
|
||||
|| (0 != (rc = write32bits(pPager->jfd, iHdrOff+4+nMaster+4, cksum)))
|
||||
|| (0 != (rc = sqlite3OsWrite(pPager->jfd, aJournalMagic, 8, iHdrOff+4+nMaster+8)))
|
||||
|| (0 != (rc = sqlite3OsWrite(pPager->jfd, aJournalMagic, 8,
|
||||
iHdrOff+4+nMaster+8)))
|
||||
){
|
||||
return rc;
|
||||
}
|
||||
|
@ -4727,7 +4728,7 @@ int sqlite3PagerOpen(
|
|||
act_like_temp_file:
|
||||
tempFile = 1;
|
||||
pPager->eState = PAGER_READER; /* Pretend we already have a lock */
|
||||
pPager->eLock = EXCLUSIVE_LOCK; /* Pretend we are in EXCLUSIVE locking mode */
|
||||
pPager->eLock = EXCLUSIVE_LOCK; /* Pretend we are in EXCLUSIVE mode */
|
||||
pPager->noLock = 1; /* Do no locking */
|
||||
readOnly = (vfsFlags&SQLITE_OPEN_READONLY);
|
||||
}
|
||||
|
@ -4746,7 +4747,7 @@ act_like_temp_file:
|
|||
assert( nExtra<1000 );
|
||||
nExtra = ROUND8(nExtra);
|
||||
rc = sqlite3PcacheOpen(szPageDflt, nExtra, !memDb,
|
||||
!memDb?pagerStress:0, (void *)pPager, pPager->pPCache);
|
||||
!memDb?pagerStress:0, (void *)pPager, pPager->pPCache);
|
||||
}
|
||||
|
||||
/* If an error occurred above, free the Pager structure and close the file.
|
||||
|
@ -5751,8 +5752,8 @@ static int pager_write(PgHdr *pPg){
|
|||
** then end of the file, make sure it is marked as PGHDR_NEED_SYNC.
|
||||
*/
|
||||
assert( (pPager->pInJournal!=0) == isOpen(pPager->jfd) );
|
||||
if( pPager->pInJournal!=0 /* Journal open */
|
||||
&& sqlite3BitvecTestNotNull(pPager->pInJournal, pPg->pgno)==0 /* pPg not in jrnl */
|
||||
if( pPager->pInJournal!=0
|
||||
&& sqlite3BitvecTestNotNull(pPager->pInJournal, pPg->pgno)==0
|
||||
){
|
||||
assert( pagerUseWal(pPager)==0 );
|
||||
if( pPg->pgno<=pPager->dbOrigSize ){
|
||||
|
@ -5792,17 +5793,17 @@ static int pager_write(PgHdr *pPg){
|
|||
** a write.
|
||||
**
|
||||
** Usually, the sector size is less than or equal to the page size, in which
|
||||
** case pages can be individually written. This routine only runs in the exceptional
|
||||
** case where the page size is smaller than the sector size.
|
||||
** case pages can be individually written. This routine only runs in the
|
||||
** exceptional case where the page size is smaller than the sector size.
|
||||
*/
|
||||
static SQLITE_NOINLINE int pagerWriteLargeSector(PgHdr *pPg){
|
||||
int rc = SQLITE_OK; /* Return code */
|
||||
Pgno nPageCount; /* Total number of pages in database file */
|
||||
Pgno pg1; /* First page of the sector pPg is located on. */
|
||||
int nPage = 0; /* Number of pages starting at pg1 to journal */
|
||||
int ii; /* Loop counter */
|
||||
int needSync = 0; /* True if any page has PGHDR_NEED_SYNC */
|
||||
Pager *pPager = pPg->pPager; /* The pager that owns pPg */
|
||||
int rc = SQLITE_OK; /* Return code */
|
||||
Pgno nPageCount; /* Total number of pages in database file */
|
||||
Pgno pg1; /* First page of the sector pPg is located on. */
|
||||
int nPage = 0; /* Number of pages starting at pg1 to journal */
|
||||
int ii; /* Loop counter */
|
||||
int needSync = 0; /* True if any page has PGHDR_NEED_SYNC */
|
||||
Pager *pPager = pPg->pPager; /* The pager that owns pPg */
|
||||
Pgno nPagePerSector = (pPager->sectorSize/pPager->pageSize);
|
||||
|
||||
/* Set the doNotSpill NOSYNC bit to 1. This is because we cannot allow
|
||||
|
|
Loading…
Reference in New Issue