mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-19 21:43:15 +03:00
Fix typos and add clarification to comments in where.c. No code changes.
FossilOrigin-Name: f8d8790ede0fcaf6c5b60ac22919c1d97c74e838
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Fix\sa\stest\scase\srelated\sto\spartial\sindices\sso\sthat\sit\sworks\seven\sif\nSTAT3\sis\sdisabled.
|
C Fix\stypos\sand\sadd\sclarification\sto\scomments\sin\swhere.c.\s\sNo\scode\schanges.
|
||||||
D 2013-08-06T19:18:17.913
|
D 2013-08-07T01:18:38.449
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
|
F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@@ -290,7 +290,7 @@ F src/vtab.c 2e8b489db47e20ae36cd247932dc671c9ded0624
|
|||||||
F src/wal.c 7dc3966ef98b74422267e7e6e46e07ff6c6eb1b4
|
F src/wal.c 7dc3966ef98b74422267e7e6e46e07ff6c6eb1b4
|
||||||
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
|
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
|
||||||
F src/walker.c 4fa43583d0a84b48f93b1e88f11adf2065be4e73
|
F src/walker.c 4fa43583d0a84b48f93b1e88f11adf2065be4e73
|
||||||
F src/where.c 67245bb73fd9cc04ee7796a0f358d4910c45cfe9
|
F src/where.c ea01a52eb31e54dda97b8e39c2e5b38faa13dce5
|
||||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||||
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
||||||
F test/aggnested.test 45c0201e28045ad38a530b5a144b73cd4aa2cfd6
|
F test/aggnested.test 45c0201e28045ad38a530b5a144b73cd4aa2cfd6
|
||||||
@@ -1105,7 +1105,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
|||||||
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
|
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
|
||||||
F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
|
F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
|
||||||
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
|
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
|
||||||
P 89930ea3c3b3bd078f641b2c5203d851083bbf1a
|
P 153c645025637bbff14dfce793e4b92210ded7e8
|
||||||
R 22d053337a8290c9ac6b0d4c1264f844
|
R bd41820faa238dc5341c3c2a4f14484a
|
||||||
U drh
|
U drh
|
||||||
Z 21ef7545513488fc6735d995a8f856cc
|
Z dce4447dee7fcad2bdba25f503c8b865
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
153c645025637bbff14dfce793e4b92210ded7e8
|
f8d8790ede0fcaf6c5b60ac22919c1d97c74e838
|
||||||
33
src/where.c
33
src/where.c
@@ -33,7 +33,7 @@
|
|||||||
# define WHERETRACE(K,X)
|
# define WHERETRACE(K,X)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Forward reference
|
/* Forward references
|
||||||
*/
|
*/
|
||||||
typedef struct WhereClause WhereClause;
|
typedef struct WhereClause WhereClause;
|
||||||
typedef struct WhereMaskSet WhereMaskSet;
|
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
|
** So all costs can be stored in a 16-bit unsigned integer without risk
|
||||||
** of overflow.
|
** of overflow.
|
||||||
**
|
**
|
||||||
** Costs are estimates, so don't go to the computational trouble to compute
|
** Costs are estimates, so no effort is made to compute 10*log2(X) exactly.
|
||||||
** 10*log2(X) exactly. Instead, a close estimate is used. Any value of
|
** Instead, a close estimate is used. Any value of X<=1 is stored as 0.
|
||||||
** X<=1 is stored as 0. X=2 is 10. X=3 is 16. X=1000 is 99. etc.
|
** X=2 is 10. X=3 is 16. X=1000 is 99. etc.
|
||||||
**
|
**
|
||||||
** The tool/wherecosttest.c source file implements a command-line program
|
** The tool/wherecosttest.c source file implements a command-line program
|
||||||
** that will convert between WhereCost to integers and do addition and
|
** that will convert WhereCosts to integers, convert integers to WhereCosts
|
||||||
** multiplication on WhereCost values. That command-line program is a
|
** and do addition and multiplication on WhereCost values. The wherecosttest
|
||||||
** useful utility to have around when working with this module.
|
** command-line program is a useful utility to have around when working with
|
||||||
|
** this module.
|
||||||
*/
|
*/
|
||||||
typedef unsigned short int WhereCost;
|
typedef unsigned short int WhereCost;
|
||||||
|
|
||||||
@@ -165,8 +166,8 @@ struct WhereOrCost {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* The WhereOrSet object holds a set of possible WhereOrCosts that
|
/* The WhereOrSet object holds a set of possible WhereOrCosts that
|
||||||
** correspond to the subquery(s) of OR-clause processing. At most
|
** correspond to the subquery(s) of OR-clause processing. Only the
|
||||||
** favorable N_OR_COST elements are retained.
|
** best N_OR_COST elements are retained.
|
||||||
*/
|
*/
|
||||||
#define N_OR_COST 3
|
#define N_OR_COST 3
|
||||||
struct WhereOrSet {
|
struct WhereOrSet {
|
||||||
@@ -232,9 +233,9 @@ struct WherePath {
|
|||||||
**
|
**
|
||||||
** (t1.X <op> <expr>) OR (t1.Y <op> <expr>) OR ....
|
** (t1.X <op> <expr>) OR (t1.Y <op> <expr>) 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
|
** 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
|
** 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
|
** 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
|
** a bitmask indicating which tables are used in that expression
|
||||||
** tree.
|
** tree.
|
||||||
*/
|
*/
|
||||||
@@ -1263,10 +1264,10 @@ static void transferJoinMarkings(Expr *pDerived, Expr *pBase){
|
|||||||
** From another point of view, "indexable" means that the subterm could
|
** From another point of view, "indexable" means that the subterm could
|
||||||
** potentially be used with an index if an appropriate index exists.
|
** potentially be used with an index if an appropriate index exists.
|
||||||
** This analysis does not consider whether or not the index exists; that
|
** This analysis does not consider whether or not the index exists; that
|
||||||
** is something the bestIndex() routine will determine. This analysis
|
** is decided elsewhere. This analysis only looks at whether subterms
|
||||||
** only looks at whether subterms appropriate for indexing exist.
|
** 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
|
** 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
|
** always prefer case 1, so in that case we pretend that case 2 is not
|
||||||
** satisfied.
|
** 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
|
** not a simple "+" operator because WhereCost is stored as a logarithmic
|
||||||
** value.
|
** value.
|
||||||
**
|
**
|
||||||
|
|||||||
Reference in New Issue
Block a user