aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2010-06-10 01:07:42 +0000
committerdrh <drh@noemail.net>2010-06-10 01:07:42 +0000
commit0350c7fa2652a2bcbafe05cec9565f1741017af0 (patch)
tree0108aab03826db89176c1a1110dffd99784e9007 /src
parent3ccd20a7a95b9b1c94a0b111d84d14cbff72afa0 (diff)
downloadsqlite-0350c7fa2652a2bcbafe05cec9565f1741017af0.tar.gz
sqlite-0350c7fa2652a2bcbafe05cec9565f1741017af0.zip
Remove a condition that must always be true. Replace it with an assert().
FossilOrigin-Name: 7abcd54ec09e8025193d1e0ea57775051d823801
Diffstat (limited to 'src')
-rw-r--r--src/pager.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/pager.c b/src/pager.c
index 95930c576..9e1ea7aa8 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -1438,15 +1438,13 @@ static int pager_end_transaction(Pager *pPager, int hasMaster){
if( pagerUseWal(pPager) ){
rc2 = sqlite3WalEndWriteTransaction(pPager->pWal);
+ assert( rc2==SQLITE_OK );
pPager->state = PAGER_SHARED;
/* If the connection was in locking_mode=exclusive mode but is no longer,
** drop the EXCLUSIVE lock held on the database file.
*/
- if( rc2==SQLITE_OK
- && !pPager->exclusiveMode
- && sqlite3WalExclusiveMode(pPager->pWal, 0)
- ){
+ if( !pPager->exclusiveMode && sqlite3WalExclusiveMode(pPager->pWal, 0) ){
rc2 = osUnlock(pPager->fd, SHARED_LOCK);
}
}else if( !pPager->exclusiveMode ){