mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Remove an unreachable branch from lockBtree(). Add comments. (CVS 6428)
FossilOrigin-Name: 859792958b4d4a3623d68526ff773f778bdf3f0d
This commit is contained in:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Fix\sa\sbug\sin\sthe\ssqlite3Utf16ByteLen()\sfunction\sso\sthat\sit\scomputes\sthe\ncorrect\slength\seven\sfor\sstrings\sthat\scontain\ssurrogate\spairs.\nTicket\s#3766.\s(CVS\s6427)
|
C Remove\san\sunreachable\sbranch\sfrom\slockBtree().\sAdd\scomments.\s(CVS\s6428)
|
||||||
D 2009-04-01T18:40:32
|
D 2009-04-01T19:07:04
|
||||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||||
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
|
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
|
||||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||||
@@ -103,7 +103,7 @@ F src/auth.c c8b2ab5c8bad4bd90ed7c294694f48269162c627
|
|||||||
F src/backup.c 0082d0e5a63f04e88faee0dff0a7d63d3e92a78d
|
F src/backup.c 0082d0e5a63f04e88faee0dff0a7d63d3e92a78d
|
||||||
F src/bitvec.c 44f7059ac1f874d364b34af31b9617e52223ba75
|
F src/bitvec.c 44f7059ac1f874d364b34af31b9617e52223ba75
|
||||||
F src/btmutex.c 341502bc496dc0840dcb00cde65680fb0e85c3ab
|
F src/btmutex.c 341502bc496dc0840dcb00cde65680fb0e85c3ab
|
||||||
F src/btree.c 3e831426631f0eff0b56d7980ba39cfc53911727
|
F src/btree.c dcf8157bd4b28a6125d2900f3031a034c1f57720
|
||||||
F src/btree.h e302c5747494067cd4f5763000fbe7bca767d816
|
F src/btree.h e302c5747494067cd4f5763000fbe7bca767d816
|
||||||
F src/btreeInt.h df64030d632f8c8ac217ed52e8b6b3eacacb33a5
|
F src/btreeInt.h df64030d632f8c8ac217ed52e8b6b3eacacb33a5
|
||||||
F src/build.c 72357fd75ef036d0afbf1756edab6d62c56fcf4b
|
F src/build.c 72357fd75ef036d0afbf1756edab6d62c56fcf4b
|
||||||
@@ -714,7 +714,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
|||||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
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
|
||||||
P 3a92c95644ead7c4728ffec1ec70676663518188
|
P 766bb7e59c28884e40ce13e3fc55c870d06d7e34
|
||||||
R a8645e4c19e0d7546ed7b3fc51d85afa
|
R 3a6094ea8b9dd0c5d4c7f018f1b56432
|
||||||
U drh
|
U danielk1977
|
||||||
Z f7ca868d3c85446b0badce3658c2c808
|
Z 51aefb40d1f48fec12c4fcbcd1a2197b
|
||||||
|
@@ -1 +1 @@
|
|||||||
766bb7e59c28884e40ce13e3fc55c870d06d7e34
|
859792958b4d4a3623d68526ff773f778bdf3f0d
|
17
src/btree.c
17
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.586 2009/04/01 18:03:01 danielk1977 Exp $
|
** $Id: btree.c,v 1.587 2009/04/01 19:07: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.
|
||||||
@@ -1886,7 +1886,7 @@ static int lockBtree(BtShared *pBt){
|
|||||||
int nPage;
|
int nPage;
|
||||||
|
|
||||||
assert( sqlite3_mutex_held(pBt->mutex) );
|
assert( sqlite3_mutex_held(pBt->mutex) );
|
||||||
if( pBt->pPage1 ) return SQLITE_OK;
|
assert( pBt->pPage1==0 );
|
||||||
rc = sqlite3BtreeGetPage(pBt, 1, &pPage1, 0);
|
rc = sqlite3BtreeGetPage(pBt, 1, &pPage1, 0);
|
||||||
if( rc!=SQLITE_OK ) return rc;
|
if( rc!=SQLITE_OK ) return rc;
|
||||||
|
|
||||||
@@ -2155,11 +2155,14 @@ int sqlite3BtreeBeginTrans(Btree *p, int wrflag){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if( pBt->pPage1==0 ){
|
/* Call lockBtree() until either pBt->pPage1 is populated or
|
||||||
do{
|
** lockBtree() returns something other than SQLITE_OK. lockBtree()
|
||||||
rc = lockBtree(pBt);
|
** may return SQLITE_OK but leave pBt->pPage1 set to 0 if after
|
||||||
}while( pBt->pPage1==0 && rc==SQLITE_OK );
|
** reading page 1 it discovers that the page-size of the database
|
||||||
}
|
** file is not pBt->pageSize. In this case lockBtree() will update
|
||||||
|
** pBt->pageSize to the page-size of the file on disk.
|
||||||
|
*/
|
||||||
|
while( pBt->pPage1==0 && SQLITE_OK==(rc = lockBtree(pBt)) );
|
||||||
|
|
||||||
if( rc==SQLITE_OK && wrflag ){
|
if( rc==SQLITE_OK && wrflag ){
|
||||||
if( pBt->readOnly ){
|
if( pBt->readOnly ){
|
||||||
|
Reference in New Issue
Block a user