Minor comment changes and code optimizations. (CVS 3029)

FossilOrigin-Name: 9e55dcd1a57f2b6ad5b267e8fa58c58b266dc8c7
This commit is contained in:
drh 2006-01-25 22:50:38 +00:00
parent 2d02a67db3
commit f248e21136
4 changed files with 23 additions and 11 deletions

View File

@ -1,5 +1,5 @@
C Rename\sfiles\susing\sfor\stesting\sonly\sso\sthat\stheir\sname\sbegins\swith\s"test".\s(CVS\s3028)
D 2006-01-25T15:55:37
C Minor\scomment\schanges\sand\scode\soptimizations.\s(CVS\s3029)
D 2006-01-25T22:50:38
F Makefile.in e936c6fc3134838318aa0335a85041e6da31f6ee
F Makefile.linux-gcc 74ba0eadf88748a9ce3fd03d2a3ede2e6715baec
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@ -63,7 +63,7 @@ F src/pager.c c9fdc3f4026f22e73d8fa586c4f58e14129036bb
F src/pager.h e0acb095b3ad0bca48f2ab00c87346665643f64f
F src/parse.y 4285cd2d0f31a8db4c4d54325f88e500452fa029
F src/pragma.c 4496cc77dc35824e1c978c3d1413b8a5a4c777d3
F src/prepare.c 6349208568d7967a3d1b6625e5af736fd0d5d264
F src/prepare.c 9753e8e5876faf806ecce8008ca8e5ed6ef768b7
F src/printf.c c7d6ad9efb71c466305297a448308f467b6e2b6e
F src/random.c d40f8d356cecbd351ccfab6eaedd7ec1b54f5261
F src/select.c daee9b20702ba51cf3807fc1b130edd8846e3e48
@ -93,7 +93,7 @@ F src/vdbe.c 799e6280aef25bae55d2da21b5a6dbdda5e76e36
F src/vdbe.h 8729a4ee16ff9aeab2af9667df3cf300ff978e13
F src/vdbeInt.h eb3f86ab08ef11635bc78eb88c3ff13f923c233b
F src/vdbeapi.c dcb2636f49b4807e34960d52a2fc257b3a751140
F src/vdbeaux.c bc90137791c9442ddd9e81453f10a23688d19dbf
F src/vdbeaux.c f2ffd1fd0e12108093db4438f111eeb7da885eda
F src/vdbefifo.c 9efb94c8c3f4c979ebd0028219483f88e57584f5
F src/vdbemem.c 2034e93b32c14bda6e306bb54e3a8e930b963027
F src/where.c 8409e00fa2cb5fce873b4c911165cfed097e9c49
@ -346,7 +346,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
P 5df9f022bfb22976f22b996bda169635354b825c
R 19654534604b9d6e28fafed119189a39
P e4e6a205e4f7c14aae31f26f42a143fce143db1c
R f02e858571336485cba13e0e2bb39429
U drh
Z cdb7895b465b1a2519023b8ebe746136
Z 6426185fbffdb9e75af912e639a777f1

View File

@ -1 +1 @@
e4e6a205e4f7c14aae31f26f42a143fce143db1c
9e55dcd1a57f2b6ad5b267e8fa58c58b266dc8c7

View File

@ -13,7 +13,7 @@
** interface, and routines that contribute to loading the database schema
** from disk.
**
** $Id: prepare.c,v 1.28 2006/01/23 00:04:55 drh Exp $
** $Id: prepare.c,v 1.29 2006/01/25 22:50:38 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@ -217,7 +217,7 @@ static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){
** meta[8]
** meta[9]
**
** Note: The hash defined SQLITE_UTF* symbols in sqliteInt.h correspond to
** Note: The #defined SQLITE_UTF* symbols in sqliteInt.h correspond to
** the possible values of meta[4].
*/
if( rc==SQLITE_OK ){
@ -440,6 +440,10 @@ void sqlite3SchemaFree(void *p){
pSchema->flags &= ~DB_SchemaLoaded;
}
/*
** Find and return the schema associated with a BTree. Create
** a new one if necessary.
*/
Schema *sqlite3SchemaGet(Btree *pBt){
Schema * p;
if( pBt ){
@ -456,6 +460,13 @@ Schema *sqlite3SchemaGet(Btree *pBt){
return p;
}
/*
** Convert a schema pointer into the iDb index that indicates
** which database file in db->aDb[] the schema refers to.
**
** If the same database is attached more than once, the first
** attached database is returned.
*/
int sqlite3SchemaToIndex(sqlite3 *db, Schema *pSchema){
int i = -1000000;

View File

@ -102,7 +102,8 @@ int sqlite3VdbeAddOp(Vdbe *p, int op, int p1, int p2){
p->nOp++;
assert( p->magic==VDBE_MAGIC_INIT );
resizeOpArray(p, i+1);
if( p->aOp==0 || p->nOpAlloc<=i ){
assert( p->aOp==0 || p->nOpAlloc>=i+1 );
if( p->aOp==0 ){
return 0;
}
pOp = &p->aOp[i];