1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Speed improvement: do not journal or rollback pages that are pulled out of

the freelist. (CVS 3531)

FossilOrigin-Name: 4dffc4c3c9c4ccc024669cec204c68e953333563
This commit is contained in:
drh
2006-12-18 18:34:51 +00:00
parent 73aa096f36
commit d3627afc47
4 changed files with 45 additions and 33 deletions

View File

@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.276 2006/11/23 11:58:44 drh Exp $
** @(#) $Id: pager.c,v 1.277 2006/12/18 18:34:51 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -31,6 +31,7 @@
** Macros for troubleshooting. Normally turned off
*/
#if 0
#define sqlite3DebugPrintf printf
#define TRACE1(X) sqlite3DebugPrintf(X)
#define TRACE2(X,Y) sqlite3DebugPrintf(X,Y)
#define TRACE3(X,Y,Z) sqlite3DebugPrintf(X,Y,Z)
@@ -3335,7 +3336,8 @@ void sqlite3pager_dont_rollback(void *pData){
PgHdr *pPg = DATA_TO_PGHDR(pData);
Pager *pPager = pPg->pPager;
if( pPager->state!=PAGER_EXCLUSIVE || pPager->journalOpen==0 ) return;
assert( pPager->state>=PAGER_RESERVED );
if( pPager->journalOpen==0 ) return;
if( pPg->alwaysRollback || pPager->alwaysRollback || MEMDB ) return;
if( !pPg->inJournal && (int)pPg->pgno <= pPager->origDbSize ){
assert( pPager->aInJournal!=0 );