mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Miscellaneous cleanup in the new pcache code. (CVS 5629)
FossilOrigin-Name: da1777259f53c2e20c7ced06bf6f2a550f0ea0fc
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.484 2008/08/27 18:03:20 drh Exp $
|
||||
** @(#) $Id: pager.c,v 1.485 2008/08/28 02:26:07 drh Exp $
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_DISKIO
|
||||
#include "sqliteInt.h"
|
||||
@@ -3271,15 +3271,14 @@ static int pager_write(PgHdr *pPg){
|
||||
&& !pageInStatement(pPg)
|
||||
&& (int)pPg->pgno<=pPager->stmtSize
|
||||
){
|
||||
assert(
|
||||
(pPg->flags&PGHDR_IN_JOURNAL) || (int)pPg->pgno>pPager->origDbSize );
|
||||
assert( (pPg->flags&PGHDR_IN_JOURNAL)
|
||||
|| (int)pPg->pgno>pPager->origDbSize );
|
||||
if( MEMDB ){
|
||||
rc = sqlite3PcachePreserve(pPg, 1);
|
||||
if( rc!=SQLITE_OK ){
|
||||
return rc;
|
||||
}
|
||||
PAGERTRACE3("STMT-JOURNAL %d page %d\n", PAGERID(pPager), pPg->pgno);
|
||||
/* page_add_to_stmt_list(pPg); */
|
||||
}else{
|
||||
i64 offset = pPager->stmtNRec*(4+pPager->pageSize);
|
||||
char *pData2 = CODEC2(pPager, pData, pPg->pgno, 7);
|
||||
@@ -3507,7 +3506,7 @@ void sqlite3PagerDontRollback(DbPage *pPg){
|
||||
assert( !MEMDB ); /* For a memdb, pPager->journalOpen is always 0 */
|
||||
|
||||
#ifdef SQLITE_SECURE_DELETE
|
||||
if( pPg->inJournal || (int)pPg->pgno>pPager->origDbSize ){
|
||||
if( (pPg->flags & PGHDR_IN_JOURNAL)!=0 || (int)pPg->pgno>pPager->origDbSize ){
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user