/ Check-in [31a5e819]
Login

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

Overview
Comment:Fix the pager so that it remembers the name of the journal for an in-memory database as an empty string. This is important when committing a multi-database transaction that includes one or more attached memory databases. (CVS 6852)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:31a5e8192e164f01c5d7c2744b67cfb517251fad
User & Date: drh 2009-07-06 21:54:41
Context
2009-07-07
02:44
Simplifications to btree.c and vdbeaux.c in support of structural coverage testing. (CVS 6853) check-in: fc2a40a9 user: drh tags: trunk
2009-07-06
21:54
Fix the pager so that it remembers the name of the journal for an in-memory database as an empty string. This is important when committing a multi-database transaction that includes one or more attached memory databases. (CVS 6852) check-in: 31a5e819 user: drh tags: trunk
19:03
Fix the backup logic so that it detects a failure to sqlite3BtreeUpdateMeta() and reports that failure back up to the top level. (CVS 6851) check-in: 471b92f2 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.603 2009/06/26 12:15:23 drh Exp $
           21  +** @(#) $Id: pager.c,v 1.604 2009/07/06 21:54:41 drh Exp $
    22     22   */
    23     23   #ifndef SQLITE_OMIT_DISKIO
    24     24   #include "sqliteInt.h"
    25     25   
    26     26   /*
    27     27   ** Macros for troubleshooting.  Normally turned off
    28     28   */
................................................................................
  3249   3249   
  3250   3250     /* Fill in the Pager.zFilename and Pager.zJournal buffers, if required. */
  3251   3251     if( zPathname ){
  3252   3252       pPager->zJournal =   (char*)(pPtr += nPathname + 1);
  3253   3253       memcpy(pPager->zFilename, zPathname, nPathname);
  3254   3254       memcpy(pPager->zJournal, zPathname, nPathname);
  3255   3255       memcpy(&pPager->zJournal[nPathname], "-journal", 8);
         3256  +    if( pPager->zFilename[0]==0 ) pPager->zJournal[0] = 0;
  3256   3257       sqlite3_free(zPathname);
  3257   3258     }
  3258   3259     pPager->pVfs = pVfs;
  3259   3260     pPager->vfsFlags = vfsFlags;
  3260   3261   
  3261   3262     /* Open the pager file.
  3262   3263     */