SQLite

Check-in [1c2f0f8477]
Login

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

Overview
Comment:Remove an always-true conditional. Replace it with an assert().
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1c2f0f8477bcf251fe874a2cfae4d7a403cb88ff
User & Date: drh 2011-04-09 17:53:30.201
Context
2011-04-09
19:17
Add test file unordered.test. (check-in: f346dae127 user: dan tags: trunk)
18:13
Pull all the latest trunk changes into the apple-osx branch. (check-in: 4eaef4ad4c user: drh tags: apple-osx)
18:07
Merge the latest trunk changes into the sessions branch. (check-in: 83705e90a5 user: drh tags: sessions)
17:53
Remove an always-true conditional. Replace it with an assert(). (check-in: 1c2f0f8477 user: drh tags: trunk)
17:32
Add VerifyCookie instructions to "DROP XXX IF EXISTS" statements if the specified database object does not exist when the statement is prepared. (check-in: a46f32900a user: dan tags: trunk)
Changes
Unified Diff Show Whitespace Changes Patch
Changes to src/backup.c.
619
620
621
622
623
624
625

626
627
628
629
630
631
632
633
634
635
    assert( sqlite3_mutex_held(p->pSrc->pBt->mutex) );
    if( !isFatalError(p->rc) && iPage<p->iNext ){
      /* The backup process p has already copied page iPage. But now it
      ** has been modified by a transaction on the source pager. Copy
      ** the new data into the backup.
      */
      int rc;

      if( p->pDestDb ) sqlite3_mutex_enter(p->pDestDb->mutex);
      rc = backupOnePage(p, iPage, aData);
      if( p->pDestDb ) sqlite3_mutex_leave(p->pDestDb->mutex);
      assert( rc!=SQLITE_BUSY && rc!=SQLITE_LOCKED );
      if( rc!=SQLITE_OK ){
        p->rc = rc;
      }
    }
  }
}







>
|

|







619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
    assert( sqlite3_mutex_held(p->pSrc->pBt->mutex) );
    if( !isFatalError(p->rc) && iPage<p->iNext ){
      /* The backup process p has already copied page iPage. But now it
      ** has been modified by a transaction on the source pager. Copy
      ** the new data into the backup.
      */
      int rc;
      assert( p->pDestDb );
      sqlite3_mutex_enter(p->pDestDb->mutex);
      rc = backupOnePage(p, iPage, aData);
      sqlite3_mutex_leave(p->pDestDb->mutex);
      assert( rc!=SQLITE_BUSY && rc!=SQLITE_LOCKED );
      if( rc!=SQLITE_OK ){
        p->rc = rc;
      }
    }
  }
}