From: drh Date: Wed, 7 Aug 2013 01:18:38 +0000 (+0000) Subject: Fix typos and add clarification to comments in where.c. No code changes. X-Git-Tag: version-3.8.0~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a6fc3596b1d2995403bf7193b51cd276274b553;p=thirdparty%2Fsqlite.git Fix typos and add clarification to comments in where.c. No code changes. FossilOrigin-Name: f8d8790ede0fcaf6c5b60ac22919c1d97c74e838 --- diff --git a/manifest b/manifest index 6e6e80a710..fda1a12844 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\stest\scase\srelated\sto\spartial\sindices\sso\sthat\sit\sworks\seven\sif\nSTAT3\sis\sdisabled. -D 2013-08-06T19:18:17.913 +C Fix\stypos\sand\sadd\sclarification\sto\scomments\sin\swhere.c.\s\sNo\scode\schanges. +D 2013-08-07T01:18:38.449 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -290,7 +290,7 @@ F src/vtab.c 2e8b489db47e20ae36cd247932dc671c9ded0624 F src/wal.c 7dc3966ef98b74422267e7e6e46e07ff6c6eb1b4 F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4 F src/walker.c 4fa43583d0a84b48f93b1e88f11adf2065be4e73 -F src/where.c 67245bb73fd9cc04ee7796a0f358d4910c45cfe9 +F src/where.c ea01a52eb31e54dda97b8e39c2e5b38faa13dce5 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/aggnested.test 45c0201e28045ad38a530b5a144b73cd4aa2cfd6 @@ -1105,7 +1105,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P 89930ea3c3b3bd078f641b2c5203d851083bbf1a -R 22d053337a8290c9ac6b0d4c1264f844 +P 153c645025637bbff14dfce793e4b92210ded7e8 +R bd41820faa238dc5341c3c2a4f14484a U drh -Z 21ef7545513488fc6735d995a8f856cc +Z dce4447dee7fcad2bdba25f503c8b865 diff --git a/manifest.uuid b/manifest.uuid index 2ed121756d..7511d7cd14 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -153c645025637bbff14dfce793e4b92210ded7e8 \ No newline at end of file +f8d8790ede0fcaf6c5b60ac22919c1d97c74e838 \ No newline at end of file diff --git a/src/where.c b/src/where.c index 2bf3aaecb7..9be48a427f 100644 --- a/src/where.c +++ b/src/where.c @@ -33,7 +33,7 @@ # define WHERETRACE(K,X) #endif -/* Forward reference +/* Forward references */ typedef struct WhereClause WhereClause; typedef struct WhereMaskSet WhereMaskSet; @@ -55,14 +55,15 @@ typedef struct WhereOrSet WhereOrSet; ** So all costs can be stored in a 16-bit unsigned integer without risk ** of overflow. ** -** Costs are estimates, so don't go to the computational trouble to compute -** 10*log2(X) exactly. Instead, a close estimate is used. Any value of -** X<=1 is stored as 0. X=2 is 10. X=3 is 16. X=1000 is 99. etc. +** Costs are estimates, so no effort is made to compute 10*log2(X) exactly. +** Instead, a close estimate is used. Any value of X<=1 is stored as 0. +** X=2 is 10. X=3 is 16. X=1000 is 99. etc. ** ** The tool/wherecosttest.c source file implements a command-line program -** that will convert between WhereCost to integers and do addition and -** multiplication on WhereCost values. That command-line program is a -** useful utility to have around when working with this module. +** that will convert WhereCosts to integers, convert integers to WhereCosts +** and do addition and multiplication on WhereCost values. The wherecosttest +** command-line program is a useful utility to have around when working with +** this module. */ typedef unsigned short int WhereCost; @@ -165,8 +166,8 @@ struct WhereOrCost { }; /* The WhereOrSet object holds a set of possible WhereOrCosts that -** correspond to the subquery(s) of OR-clause processing. At most -** favorable N_OR_COST elements are retained. +** correspond to the subquery(s) of OR-clause processing. Only the +** best N_OR_COST elements are retained. */ #define N_OR_COST 3 struct WhereOrSet { @@ -232,9 +233,9 @@ struct WherePath { ** ** (t1.X ) OR (t1.Y ) OR .... ** -** In this second case, wtFlag as the TERM_ORINFO set and eOperator==WO_OR +** In this second case, wtFlag has the TERM_ORINFO bit set and eOperator==WO_OR ** and the WhereTerm.u.pOrInfo field points to auxiliary information that -** is collected about the +** is collected about the OR clause. ** ** If a term in the WHERE clause does not match either of the two previous ** categories, then eOperator==0. The WhereTerm.pExpr field is still set @@ -746,7 +747,7 @@ static void createMask(WhereMaskSet *pMaskSet, int iCursor){ } /* -** These routine walk (recursively) an expression tree and generates +** These routines walk (recursively) an expression tree and generate ** a bitmask indicating which tables are used in that expression ** tree. */ @@ -1263,10 +1264,10 @@ static void transferJoinMarkings(Expr *pDerived, Expr *pBase){ ** From another point of view, "indexable" means that the subterm could ** potentially be used with an index if an appropriate index exists. ** This analysis does not consider whether or not the index exists; that -** is something the bestIndex() routine will determine. This analysis -** only looks at whether subterms appropriate for indexing exist. +** is decided elsewhere. This analysis only looks at whether subterms +** appropriate for indexing exist. ** -** All examples A through E above all satisfy case 2. But if a term +** All examples A through E above satisfy case 2. But if a term ** also statisfies case 1 (such as B) we know that the optimizer will ** always prefer case 1, so in that case we pretend that case 2 is not ** satisfied. @@ -1933,7 +1934,7 @@ static int isDistinctRedundant( } /* -** The (an approximate) sum of two WhereCosts. This computation is +** Find (an approximate) sum of two WhereCosts. This computation is ** not a simple "+" operator because WhereCost is stored as a logarithmic ** value. **