Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | More simplifications to pager.c. (CVS 6939) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
533d6cc67a3b6467db5b83c5ca535d22 |
User & Date: | drh 2009-07-25 17:08:36.000 |
Context
2009-07-25
| ||
17:33 | Change a condition to a '%' operator in bitvec.c. (CVS 6940) (check-in: 10250fe5c0 user: drh tags: trunk) | |
17:08 | More simplifications to pager.c. (CVS 6939) (check-in: 533d6cc67a user: drh tags: trunk) | |
15:24 | Simplifications and comment improvements to pager.c in support of coverage testing. (CVS 6938) (check-in: 5b70b5c19c user: drh tags: trunk) | |
Changes
Changes to src/pager.c.
︙ | ︙ | |||
14 15 16 17 18 19 20 | ** The pager is used to access a database disk file. It implements ** atomic commit and rollback through the use of a journal file that ** is separate from the database file. The pager also implements file ** locking to prevent two processes from writing the same database ** file simultaneously, or one process from reading the database while ** another is writing. ** | | | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ** The pager is used to access a database disk file. It implements ** atomic commit and rollback through the use of a journal file that ** is separate from the database file. The pager also implements file ** locking to prevent two processes from writing the same database ** file simultaneously, or one process from reading the database while ** another is writing. ** ** @(#) $Id: pager.c,v 1.624 2009/07/25 17:08:36 drh Exp $ */ #ifndef SQLITE_OMIT_DISKIO #include "sqliteInt.h" /* ** Macros for troubleshooting. Normally turned off */ |
︙ | ︙ | |||
1175 1176 1177 1178 1179 1180 1181 | static int pager_error(Pager *pPager, int rc){ int rc2 = rc & 0xff; assert( pPager->errCode==SQLITE_FULL || pPager->errCode==SQLITE_OK || (pPager->errCode & 0xff)==SQLITE_IOERR ); | < | < < < < < < < < < < < < | 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 | static int pager_error(Pager *pPager, int rc){ int rc2 = rc & 0xff; assert( pPager->errCode==SQLITE_FULL || pPager->errCode==SQLITE_OK || (pPager->errCode & 0xff)==SQLITE_IOERR ); if( rc2==SQLITE_FULL || rc2==SQLITE_IOERR ){ pPager->errCode = rc; } return rc; } /* ** Execute a rollback if a transaction is active and unlock the ** database file. |
︙ | ︙ | |||
3061 3062 3063 3064 3065 3066 3067 | ** flag is set, return without doing anything. The pcache layer will ** just have to go ahead and allocate a new page buffer instead of ** reusing pPg. ** ** Similarly, if the pager has already entered the error state, do not ** try to write the contents of pPg to disk. */ | > | > | 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 | ** flag is set, return without doing anything. The pcache layer will ** just have to go ahead and allocate a new page buffer instead of ** reusing pPg. ** ** Similarly, if the pager has already entered the error state, do not ** try to write the contents of pPg to disk. */ if( NEVER(pPager->errCode) || (pPager->doNotSync && pPg->flags&PGHDR_NEED_SYNC) ){ return SQLITE_OK; } /* Sync the journal file if required. */ if( pPg->flags&PGHDR_NEED_SYNC ){ rc = syncJournal(pPager); if( rc==SQLITE_OK && pPager->fullSync && |
︙ | ︙ |