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

Fix a bug in autovacuum introduced by (3839). (CVS 3841)

FossilOrigin-Name: e39efa195a28f1cd7431b0811bd908dc7af3c8b1
This commit is contained in:
drh
2007-04-13 04:01:58 +00:00
parent 6558db80c0
commit d215acf1f4
3 changed files with 10 additions and 10 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.327 2007/04/13 02:14:30 drh Exp $
** @(#) $Id: pager.c,v 1.328 2007/04/13 04:01:59 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -3017,9 +3017,9 @@ int sqlite3PagerAcquire(
/* Populate the page with data, either by reading from the database
** file, or by setting the entire page to zero.
*/
if( nMax<(int)pgno || MEMDB || noContent ){
if( nMax<(int)pgno || MEMDB || (noContent && !pPager->alwaysRollback) ){
memset(PGHDR_TO_DATA(pPg), 0, pPager->pageSize);
pPg->needRead = noContent;
pPg->needRead = noContent && !pPager->alwaysRollback;
IOTRACE(("ZERO %p %d\n", pPager, pgno));
}else{
rc = readDbPage(pPager, pPg, pgno);