/ Check-in [e39efa19]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a bug in autovacuum introduced by (3839). (CVS 3841)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:e39efa195a28f1cd7431b0811bd908dc7af3c8b1
User & Date: drh 2007-04-13 04:01:59
Context
2007-04-13
16:06
Match ORDER BY terms to columns using names in compound queries. Make sure this works for subqueries, especially in the right-hand side of an IN operator. Ticket #2296. (CVS 3842) check-in: cfc6f933 user: drh tags: trunk
04:01
Fix a bug in autovacuum introduced by (3839). (CVS 3841) check-in: e39efa19 user: drh tags: trunk
03:23
Additional tests designed to detect future performance regressions. (CVS 3840) check-in: 764e7262 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pager.c.

    14     14   ** The pager is used to access a database disk file.  It implements
    15     15   ** atomic commit and rollback through the use of a journal file that
    16     16   ** is separate from the database file.  The pager also implements file
    17     17   ** locking to prevent two processes from writing the same database
    18     18   ** file simultaneously, or one process from reading the database while
    19     19   ** another is writing.
    20     20   **
    21         -** @(#) $Id: pager.c,v 1.327 2007/04/13 02:14:30 drh Exp $
           21  +** @(#) $Id: pager.c,v 1.328 2007/04/13 04:01:59 drh Exp $
    22     22   */
    23     23   #ifndef SQLITE_OMIT_DISKIO
    24     24   #include "sqliteInt.h"
    25     25   #include "os.h"
    26     26   #include "pager.h"
    27     27   #include <assert.h>
    28     28   #include <string.h>
................................................................................
  3013   3013         rc = pPager->errCode;
  3014   3014         return rc;
  3015   3015       }
  3016   3016   
  3017   3017       /* Populate the page with data, either by reading from the database
  3018   3018       ** file, or by setting the entire page to zero.
  3019   3019       */
  3020         -    if( nMax<(int)pgno || MEMDB || noContent ){
         3020  +    if( nMax<(int)pgno || MEMDB || (noContent && !pPager->alwaysRollback) ){
  3021   3021         memset(PGHDR_TO_DATA(pPg), 0, pPager->pageSize);
  3022         -      pPg->needRead = noContent;
         3022  +      pPg->needRead = noContent && !pPager->alwaysRollback;
  3023   3023         IOTRACE(("ZERO %p %d\n", pPager, pgno));
  3024   3024       }else{
  3025   3025         rc = readDbPage(pPager, pPg, pgno);
  3026   3026         if( rc!=SQLITE_OK && rc!=SQLITE_IOERR_SHORT_READ ){
  3027   3027           pPg->pgno = 0;
  3028   3028           sqlite3PagerUnref(pPg);
  3029   3029           return rc;