/ Check-in [e4452e8a]
Login

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

Overview
Comment:Remove a c++ comment in pager.c. (CVS 3730)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e4452e8aede9282feaeeac19d0cdf82b01c3cc19
User & Date: danielk1977 2007-03-27 17:37:32
Context
2007-03-27
21:47
Fix the prototype of the CodecAttach function in attach.c. (CVS 3731) check-in: 902413e8 user: drh tags: trunk
17:37
Remove a c++ comment in pager.c. (CVS 3730) check-in: e4452e8a user: danielk1977 tags: trunk
16:19
Test handling of IO errors that occur in OsDelete() or OsTruncate() operations. Also use an anonymous file for temporary storage during a VACUUM. (CVS 3729) check-in: b24a6e7b user: danielk1977 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.302 2007/03/27 16:19:52 danielk1977 Exp $
           21  +** @(#) $Id: pager.c,v 1.303 2007/03/27 17:37:32 danielk1977 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>
................................................................................
  3023   3023       }
  3024   3024     
  3025   3025       /* When all pages reach the freelist, drop the read lock from
  3026   3026       ** the database file.
  3027   3027       */
  3028   3028       pPager->nRef--;
  3029   3029       assert( pPager->nRef>=0 );
  3030         -    // assert( pPager->nRef>0 || !pPager->journalOpen || pPager->journalOff==0 );
  3031         -    if( pPager->nRef==0 && !pPager->exclusiveMode ){
         3030  +    if( pPager->nRef==0 && (!pPager->exclusiveMode || pPager->journalOff>0) ){
  3032   3031         pagerUnlockAndRollback(pPager);
  3033   3032       }
  3034   3033     }
  3035   3034     return SQLITE_OK;
  3036   3035   }
  3037   3036   
  3038   3037   /*