SQLite

Check-in [dacdec78d0]
Login

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

Overview
Comment:Fix a problem with sqlite3_backup_step() that resulted from a faulty merge.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | apple-osx
Files: files | file ages | folders
SHA1: dacdec78d010922b6357f5319108289d087b6028
User & Date: drh 2011-10-31 19:59:09.047
Context
2011-12-08
21:08
Merge the latest trunk changes into the apple-osx branch. (check-in: 59e0d4f3d9 user: drh tags: apple-osx)
2011-10-31
19:59
Fix a problem with sqlite3_backup_step() that resulted from a faulty merge. (check-in: dacdec78d0 user: drh tags: apple-osx)
19:34
Fix the os_unix.c source file so that it will build as part of an amalgamation on non-apple platforms. (check-in: b2f7639c8f user: drh tags: apple-osx)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/backup.c.
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
      if( rc==SQLITE_OK ){
        if( p->pDestDb ){
          sqlite3ResetInternalSchema(p->pDestDb, -1);
        }
        if( destMode==PAGER_JOURNALMODE_WAL ){
          rc = sqlite3BtreeSetVersion(p->pDest, 2);
        }
        }
      
      if( destMode==PAGER_JOURNALMODE_WAL ){
          /* This call cannot fail. The success of the BtreeUpdateMeta()
          ** method above indicates that a write transaction has been opened
          ** and page 1 is already dirty. Therefore this always succeeds.
          */
          TESTONLY(int rc2 =) sqlite3BtreeSetVersion(p->pDest, 2);
          assert( rc2==SQLITE_OK );
      }
      if( rc==SQLITE_OK ){
        int nDestTruncate;
        /* Set nDestTruncate to the final number of pages in the destination
        ** database. The complication here is that the destination page
        ** size may be different to the source page size. 
        **







<
<
<
<
<
<
<
<
<







415
416
417
418
419
420
421









422
423
424
425
426
427
428
      if( rc==SQLITE_OK ){
        if( p->pDestDb ){
          sqlite3ResetInternalSchema(p->pDestDb, -1);
        }
        if( destMode==PAGER_JOURNALMODE_WAL ){
          rc = sqlite3BtreeSetVersion(p->pDest, 2);
        }









      }
      if( rc==SQLITE_OK ){
        int nDestTruncate;
        /* Set nDestTruncate to the final number of pages in the destination
        ** database. The complication here is that the destination page
        ** size may be different to the source page size. 
        **