Replace an "if" condition that is always true in btree.c with an assert(). (CVS 6814)
FossilOrigin-Name: daadbd9a8f0e35dd16c715cf2e9f99f52afa30dd
This commit is contained in:
parent
4c8555fd47
commit
c1761e887b
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
|||||||
C Improved\shandling\sof\soversize\sstring\sand\sblob\serrors.\s\sOther\ssimplifications\nin\ssupport\sof\sfull\scoverage\stesting.\s(CVS\s6813)
|
C Replace\san\s"if"\scondition\sthat\sis\salways\strue\sin\sbtree.c\swith\san\sassert().\s(CVS\s6814)
|
||||||
D 2009-06-25T01:47:12
|
D 2009-06-25T09:40:04
|
||||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||||
F Makefile.in 8b8fb7823264331210cddf103831816c286ba446
|
F Makefile.in 8b8fb7823264331210cddf103831816c286ba446
|
||||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||||
@ -106,7 +106,7 @@ F src/auth.c 98db07c2088455797678eb1031f42d4d94d18a71
|
|||||||
F src/backup.c ff50af53184a5fd7bdee4d620b5dabef74717c79
|
F src/backup.c ff50af53184a5fd7bdee4d620b5dabef74717c79
|
||||||
F src/bitvec.c 0ef0651714728055d43de7a4cdd95e703fac0119
|
F src/bitvec.c 0ef0651714728055d43de7a4cdd95e703fac0119
|
||||||
F src/btmutex.c 9b899c0d8df3bd68f527b0afe03088321b696d3c
|
F src/btmutex.c 9b899c0d8df3bd68f527b0afe03088321b696d3c
|
||||||
F src/btree.c 699c333dd98db2498eb17ca43b2a5482c9dd098f
|
F src/btree.c d57b29353c855d99be435cf89378a5dad1b69c53
|
||||||
F src/btree.h f70b694e8c163227369a66863b01fbff9009f323
|
F src/btree.h f70b694e8c163227369a66863b01fbff9009f323
|
||||||
F src/btreeInt.h 55346bc14b939ad41b297942e8b1b581e960fb99
|
F src/btreeInt.h 55346bc14b939ad41b297942e8b1b581e960fb99
|
||||||
F src/build.c d930b3899aea564f01a581e0e9429d92fb5f98f0
|
F src/build.c d930b3899aea564f01a581e0e9429d92fb5f98f0
|
||||||
@ -737,7 +737,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
|||||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||||
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
|
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
|
||||||
P 52eac078c7080519911599e19819cbec475de6d6
|
P 8b34076668f0f712de0fbbe9bc2e68d42797e1b2
|
||||||
R 6ae3c2ac4bc1cff164725bbb4ce26ae6
|
R 14a6c3f47ca2c7926c974d33b6245e2a
|
||||||
U drh
|
U danielk1977
|
||||||
Z bf5a48beb2bf6181503a39e1dcbe0d85
|
Z a36489898102c6f72dd80b9561deee89
|
||||||
|
@ -1 +1 @@
|
|||||||
8b34076668f0f712de0fbbe9bc2e68d42797e1b2
|
daadbd9a8f0e35dd16c715cf2e9f99f52afa30dd
|
10
src/btree.c
10
src/btree.c
@ -9,7 +9,7 @@
|
|||||||
** May you share freely, never taking more than you give.
|
** 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.
|
** This file implements a external (disk-based) database using BTrees.
|
||||||
** See the header comment on "btreeInt.h" for additional information.
|
** See the header comment on "btreeInt.h" for additional information.
|
||||||
@ -2115,10 +2115,10 @@ static int lockBtreeWithRetry(Btree *pRef){
|
|||||||
static void unlockBtreeIfUnused(BtShared *pBt){
|
static void unlockBtreeIfUnused(BtShared *pBt){
|
||||||
assert( sqlite3_mutex_held(pBt->mutex) );
|
assert( sqlite3_mutex_held(pBt->mutex) );
|
||||||
if( pBt->inTransaction==TRANS_NONE && pBt->pCursor==0 && pBt->pPage1!=0 ){
|
if( pBt->inTransaction==TRANS_NONE && pBt->pCursor==0 && pBt->pPage1!=0 ){
|
||||||
if( sqlite3PagerRefcount(pBt->pPager)>=1 ){
|
assert( pBt->pPage1->aData );
|
||||||
assert( pBt->pPage1->aData );
|
assert( sqlite3PagerRefcount(pBt->pPager)==1 );
|
||||||
releasePage(pBt->pPage1);
|
assert( pBt->pPage1->aData );
|
||||||
}
|
releasePage(pBt->pPage1);
|
||||||
pBt->pPage1 = 0;
|
pBt->pPage1 = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user