/ Check-in [f5fad52a]
Login

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

Overview
Comment:Remove asserts on the existing of journal files in pager - asserts that are not valid for certain kinds of simulated I/O errors or for async I/O. (CVS 3769)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f5fad52a97a16faddc2701ea0e05a301974eda1a
User & Date: drh 2007-03-30 17:18:51
Context
2007-03-30
18:21
Coverage testing for a few lines in pager.c. (CVS 3770) check-in: c1aca18f user: danielk1977 tags: trunk
17:18
Remove asserts on the existing of journal files in pager - asserts that are not valid for certain kinds of simulated I/O errors or for async I/O. (CVS 3769) check-in: f5fad52a user: drh tags: trunk
17:17
Get the memleak.test script working again after recent changes. (CVS 3768) check-in: cd6ca078 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.309 2007/03/30 16:01:55 drh Exp $
           21  +** @(#) $Id: pager.c,v 1.310 2007/03/30 17:18:51 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>
................................................................................
   952    952         sqlite3OsClose(&pPager->jfd);
   953    953         pPager->journalOpen = 0;
   954    954         /* If this is a temporary pager file, then the journal file should
   955    955         ** have been configured as delete-on-close. Otherwise, it should still
   956    956         ** be in the file system. This pager still holds a RESERVED or greater
   957    957         ** lock on the database file, so there is no chance another process
   958    958         ** could create or remove a journal file.
          959  +      **
          960  +      ** These asserts are not valid for asynchronous I/O such as is found
          961  +      ** in async.test
   959    962         */
   960         -      assert( sqlite3OsFileExists(pPager->zJournal) || pPager->tempFile );
   961         -      assert( !sqlite3OsFileExists(pPager->zJournal) || !pPager->tempFile );
          963  +      /*assert( sqlite3OsFileExists(pPager->zJournal) || pPager->tempFile );*/
          964  +      /*assert( !sqlite3OsFileExists(pPager->zJournal) || !pPager->tempFile );*/
   962    965         if( !pPager->tempFile ){
   963    966           rc = sqlite3OsDelete(pPager->zJournal);
   964    967         }
   965    968       }
   966    969       sqliteFree( pPager->aInJournal );
   967    970       pPager->aInJournal = 0;
   968    971       for(pPg=pPager->pAll; pPg; pPg=pPg->pNextAll){