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

Simplifications and comment enhancements on btree.c. (CVS 6925)

FossilOrigin-Name: 5ba880dde8a219543ced6f792c7f9ecdcd8c1cbb
This commit is contained in:
drh
2009-07-23 01:43:59 +00:00
parent 440637eb46
commit e39f2f9326
3 changed files with 16 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
C Modify\smksqlite3c.tcl\sso\sthat\sit\sinserts\sSQLITE_API\smacros\sinto\ssqlite3.h.\sTicket\s#3983.\s(CVS\s6924)
D 2009-07-22T18:24:54
C Simplifications\sand\scomment\senhancements\son\sbtree.c.\s(CVS\s6925)
D 2009-07-23T01:44:00
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -106,7 +106,7 @@ F src/auth.c 802a9439dfa0b8c208b10055cba400e82ef18025
F src/backup.c 6f1c2d9862c8a3feb7739dfcca02c1f5352e37f3
F src/bitvec.c cfbf6af5b0ababb4f06ed3e75c616dadaf47fcbd
F src/btmutex.c 0f43a75bb5b8147b386e8e1c3e71ba734e3863b7
F src/btree.c e3cd5ed99cdf946d9e95dd88dd09647746e472f5
F src/btree.c 64fbba1140bb06edbac2553cfd339145bbdc2665
F src/btree.h 577448a890c2ab9b21e6ab74f073526184bceebe
F src/btreeInt.h 1c86297e69380f6577e7ae67452597dd8d5c2705
F src/build.c 867028ee9f63f7bc8eb8d4a720bb98cf9b9a12b4
@@ -741,7 +741,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
P 375fd6f9c54fa5aa8cfae30845c7bfc0ec49e8fa
R f2c5a9364fc57c0663cfd0bb1d794a61
U danielk1977
Z b281c46d3b56ab640d5620716ac447c6
P 803ec79f3b05fdd680f9ab762685bbd50a087b9b
R 1af5efb9239298a70b679f6a0b5afcda
U drh
Z 203e36635efa708168ec055bebd9cda7

View File

@@ -1 +1 @@
803ec79f3b05fdd680f9ab762685bbd50a087b9b
5ba880dde8a219543ced6f792c7f9ecdcd8c1cbb

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.700 2009/07/22 18:07:41 drh Exp $
** $Id: btree.c,v 1.701 2009/07/23 01:44:00 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -2315,8 +2315,9 @@ static void unlockBtreeIfUnused(BtShared *pBt){
}
/*
** Create a new database by initializing the first page of the
** file.
** If pBt points to an empty file then convert that empty file
** into a new empty database by initializing the first page of
** the database.
*/
static int newDatabase(BtShared *pBt){
MemPage *pP1;
@@ -2325,8 +2326,11 @@ static int newDatabase(BtShared *pBt){
int nPage;
assert( sqlite3_mutex_held(pBt->mutex) );
/* The database size has already been measured and cached, so failure
** is impossible here. If the original size measurement failed, then
** processing aborts before entering this routine. */
rc = sqlite3PagerPagecount(pBt->pPager, &nPage);
if( rc!=SQLITE_OK || nPage>0 ){
if( NEVER(rc!=SQLITE_OK) || nPage>0 ){
return rc;
}
pP1 = pBt->pPage1;