Index: src/pcache.c ================================================================== --- src/pcache.c +++ src/pcache.c @@ -9,11 +9,11 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file implements that page cache. ** -** @(#) $Id: pcache.c,v 1.2 2008/08/20 21:47:46 drh Exp $ +** @(#) $Id: pcache.c,v 1.3 2008/08/21 04:41:02 danielk1977 Exp $ */ #include "sqliteInt.h" /* ** A complete page cache is an instance of this structure. @@ -1028,11 +1028,10 @@ ** ** This is used by the pager module to implement the xStress callback. */ PgHdr *sqlite3PcacheDirtyPage(PCache *pCache){ PgHdr *p = 0; - assert( pCache->iInUseMM ); #if 1 PgHdr *pIter; Pgno min_pgno; for(pIter=pCache->pDirty; pIter; pIter=pIter->pNext){ if( pIter->nRef==0 && (p==0 || pIter->pgnopDirty; p && p->nRef; p=p->pNext); #endif + assert( pCache->iInUseMM ); if( p ){ p->pDirty = 0; } return p; }