/ Check-in [f4288520]
Login

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

Overview
Comment:Rewind the checkpoint journal after each statement to avoid allowing the file to become too large. (CVS 744)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f4288520dfd1587446e50fa7ef23f75f6f63a7cf
User & Date: drh 2002-09-05 19:10:33
Context
2002-09-05
23:21
Fix a memory leak that occurred when sqlite_open() failed. (CVS 745) check-in: a8760213 user: drh tags: trunk
19:10
Rewind the checkpoint journal after each statement to avoid allowing the file to become too large. (CVS 744) check-in: f4288520 user: drh tags: trunk
16:08
Fix for ticket #146: Correctly handle reads of unused disk blocks at the end of the file. (CVS 743) check-in: f5c26547 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.52 2002/09/05 16:08:27 drh Exp $
           21  +** @(#) $Id: pager.c,v 1.53 2002/09/05 19:10:33 drh Exp $
    22     22   */
    23     23   #include "sqliteInt.h"
    24     24   #include "pager.h"
    25     25   #include "os.h"
    26     26   #include <assert.h>
    27     27   #include <string.h>
    28     28   
................................................................................
  1513   1513   
  1514   1514   /*
  1515   1515   ** Commit a checkpoint.
  1516   1516   */
  1517   1517   int sqlitepager_ckpt_commit(Pager *pPager){
  1518   1518     if( pPager->ckptInUse ){
  1519   1519       PgHdr *pPg;
         1520  +    sqliteOsSeek(&pPager->cpfd, 0);
  1520   1521       sqliteOsTruncate(&pPager->cpfd, 0);
  1521   1522       pPager->ckptInUse = 0;
  1522   1523       sqliteFree( pPager->aInCkpt );
  1523   1524       pPager->aInCkpt = 0;
  1524   1525       for(pPg=pPager->pAll; pPg; pPg=pPg->pNextAll){
  1525   1526         pPg->inCkpt = 0;
  1526   1527       }