Add a comment to the pageReinit() routine explaining why the return code from

sqlite3BtreeInitPage() is ignored.  Comment change only - no changes to code. (CVS 6412)

FossilOrigin-Name: 10f605be8c92ff94625a0da0e23b2ffd55ec7509
This commit is contained in:
drh 2009-03-30 17:19:48 +00:00
parent 5be31f519b
commit 5e8d8878fe
3 changed files with 15 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Modify\sintegrity-check\sto\sprevent\sa\sbuffer\soverread\swhen\sdealing\swith\sa\scorrupted\sdatabase.\s(CVS\s6411)
D 2009-03-30T13:53:43
C Add\sa\scomment\sto\sthe\spageReinit()\sroutine\sexplaining\swhy\sthe\sreturn\scode\sfrom\nsqlite3BtreeInitPage()\sis\signored.\s\sComment\schange\sonly\s-\sno\schanges\sto\scode.\s(CVS\s6412)
D 2009-03-30T17:19:48
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -103,7 +103,7 @@ F src/auth.c c8b2ab5c8bad4bd90ed7c294694f48269162c627
F src/backup.c 0082d0e5a63f04e88faee0dff0a7d63d3e92a78d
F src/bitvec.c 44f7059ac1f874d364b34af31b9617e52223ba75
F src/btmutex.c 341502bc496dc0840dcb00cde65680fb0e85c3ab
F src/btree.c 5f99af1adb683c4bea6f84e32b7946f3df748bda
F src/btree.c 244dddea3a0550b033beb0aff11fbe063e6737d9
F src/btree.h e302c5747494067cd4f5763000fbe7bca767d816
F src/btreeInt.h df64030d632f8c8ac217ed52e8b6b3eacacb33a5
F src/build.c be2bdaf2a3f6b24ef08dc14b9fd33aa84c689908
@ -711,7 +711,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P 18b44f0df3d75689fb5cee20120eb3c6ae5882b3
R 19a418b68e502c278b55debcd479fd8e
U danielk1977
Z 32feefd9ba4cee6cc7bd15aa8b32502a
P 3c9097f19adae071a12e1114f64993d0c1da1163
R c15d6b785082eeb631152837ce181dcc
U drh
Z cfb8b82928a38324cd93571c1fccef55

View File

@ -1 +1 @@
3c9097f19adae071a12e1114f64993d0c1da1163
10f605be8c92ff94625a0da0e23b2ffd55ec7509

View File

@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.580 2009/03/30 13:53:43 danielk1977 Exp $
** $Id: btree.c,v 1.581 2009/03/30 17:19:48 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@ -1305,6 +1305,12 @@ static void pageReinit(DbPage *pData){
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
pPage->isInit = 0;
if( sqlite3PagerPageRefcount(pData)>0 ){
/* pPage might not be a btree page; it might be an overflow page
** or ptrmap page or a free page. In those cases, the following
** call to sqlite3BtreeInitPage() will likely return SQLITE_CORRUPT.
** But no harm is done by this. And it is very important that
** sqlite3BtreeInitPage() be called on every btree page so we make
** the call for every page that comes in for re-initing. */
sqlite3BtreeInitPage(pPage);
}
}