/ Check-in [de8b87d6]
Login

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

Overview
Comment:Avoid attempting to delete the journal file of a temporary pager when closing the pager. It will be deleted automatically by the OS layer. (CVS 5193)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: de8b87d65a85c4dabe53281092d9a23555a8e2d6
User & Date: danielk1977 2008-06-06 16:14:02
Context
2008-06-07
05:19
Do not call xSync() from zeroJournalHdr() if the Pager.noSync flag is set (i.e. for temp files). (CVS 5194) check-in: 9f5cbe29 user: danielk1977 tags: trunk
2008-06-06
16:14
Avoid attempting to delete the journal file of a temporary pager when closing the pager. It will be deleted automatically by the OS layer. (CVS 5193) check-in: de8b87d6 user: danielk1977 tags: trunk
15:49
Add the xGetLastError() member function to the sqlite3_vfs structure. It is neither called nor implemented at this point. (CVS 5192) check-in: b8f1da52 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.453 2008/06/06 11:11:26 danielk1977 Exp $
           21  +** @(#) $Id: pager.c,v 1.454 2008/06/06 16:14:02 danielk1977 Exp $
    22     22   */
    23     23   #ifndef SQLITE_OMIT_DISKIO
    24     24   #include "sqliteInt.h"
    25     25   #include <assert.h>
    26     26   #include <string.h>
    27     27   
    28     28   /*
................................................................................
  1422   1422         rc = zeroJournalHdr(pPager, hasMaster);
  1423   1423         pager_error(pPager, rc);
  1424   1424         pPager->journalOff = 0;
  1425   1425         pPager->journalStarted = 0;
  1426   1426       }else{
  1427   1427         sqlite3OsClose(pPager->jfd);
  1428   1428         pPager->journalOpen = 0;
  1429         -      if( rc==SQLITE_OK ){
         1429  +      if( rc==SQLITE_OK && !pPager->tempFile ){
  1430   1430           rc = sqlite3OsDelete(pPager->pVfs, pPager->zJournal, 0);
  1431   1431         }
  1432   1432       }
  1433   1433       sqlite3BitvecDestroy(pPager->pInJournal);
  1434   1434       pPager->pInJournal = 0;
  1435   1435       for(pPg=pPager->pAll; pPg; pPg=pPg->pNextAll){
  1436   1436         pPg->inJournal = 0;