mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Remove a condition that must always be true. Replace it with an assert().
FossilOrigin-Name: 7abcd54ec09e8025193d1e0ea57775051d823801
This commit is contained in:
@@ -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 ){
|
||||
|
Reference in New Issue
Block a user