1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Replace an "if" condition that is always true in btree.c with an assert(). (CVS 6814)

FossilOrigin-Name: daadbd9a8f0e35dd16c715cf2e9f99f52afa30dd
This commit is contained in:
danielk1977
2009-06-25 09:40:03 +00:00
parent 4c8555fd47
commit c1761e887b
3 changed files with 13 additions and 13 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.642 2009/06/24 05:40:34 danielk1977 Exp $
** $Id: btree.c,v 1.643 2009/06/25 09:40:04 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -2115,10 +2115,10 @@ static int lockBtreeWithRetry(Btree *pRef){
static void unlockBtreeIfUnused(BtShared *pBt){
assert( sqlite3_mutex_held(pBt->mutex) );
if( pBt->inTransaction==TRANS_NONE && pBt->pCursor==0 && pBt->pPage1!=0 ){
if( sqlite3PagerRefcount(pBt->pPager)>=1 ){
assert( pBt->pPage1->aData );
releasePage(pBt->pPage1);
}
assert( pBt->pPage1->aData );
assert( sqlite3PagerRefcount(pBt->pPager)==1 );
assert( pBt->pPage1->aData );
releasePage(pBt->pPage1);
pBt->pPage1 = 0;
}
}