Overview
| SHA1 Hash: | f476eace86102fd5442cfbba169c18f6ee44eae2 |
|---|---|
| Date: | 2013-03-01 21:01:05 |
| User: | drh |
| Comment: | Fix an overly restrictive assert() in the pager. |
Tags And Properties
- branch=trunk inherited from [704b122e53]
- sym-trunk inherited from [704b122e53]
Changes
Changes to src/pager.c
6447 ** 6447 ** 6448 ** If the isCommit flag is set, there is no need to remember that 6448 ** If the isCommit flag is set, there is no need to remember that 6449 ** the journal needs to be sync()ed before database page pPg->pgno 6449 ** the journal needs to be sync()ed before database page pPg->pgno 6450 ** can be written to. The caller has already promised not to write to it. 6450 ** can be written to. The caller has already promised not to write to it. 6451 */ 6451 */ 6452 if( (pPg->flags&PGHDR_NEED_SYNC) && !isCommit ){ 6452 if( (pPg->flags&PGHDR_NEED_SYNC) && !isCommit ){ 6453 needSyncPgno = pPg->pgno; 6453 needSyncPgno = pPg->pgno; > 6454 assert( pPager->journalMode==PAGER_JOURNALMODE_OFF || 6454 assert( pageInJournal(pPg) || pPg->pgno>pPager->dbOrigSize ); | 6455 pageInJournal(pPg) || pPg->pgno>pPager->dbOrigSize ); 6455 assert( pPg->flags&PGHDR_DIRTY ); 6456 assert( pPg->flags&PGHDR_DIRTY ); 6456 } 6457 } 6457 6458 6458 /* If the cache contains a page with page-number pgno, remove it 6459 /* If the cache contains a page with page-number pgno, remove it 6459 ** from its hash chain. Also, if the PGHDR_NEED_SYNC flag was set for 6460 ** from its hash chain. Also, if the PGHDR_NEED_SYNC flag was set for 6460 ** page pgno before the 'move' operation, it needs to be retained 6461 ** page pgno before the 'move' operation, it needs to be retained 6461 ** for the page moved there. 6462 ** for the page moved there.