1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Fix compiler warnings. Better comments on some variables associated with

LIKE/GLOB processing in the query planner.

FossilOrigin-Name: cfa2db0ff7a94e7f66c35f672ee41cadd45a6dd7
This commit is contained in:
drh
2009-11-01 19:26:59 +00:00
parent 1aca4f968c
commit 1d452e1de0
5 changed files with 26 additions and 23 deletions

View File

@@ -1098,13 +1098,13 @@ static void exprAnalyze(
Expr *pExpr; /* The expression to be analyzed */
Bitmask prereqLeft; /* Prerequesites of the pExpr->pLeft */
Bitmask prereqAll; /* Prerequesites of pExpr */
Bitmask extraRight = 0;
int isComplete;
int noCase;
Bitmask extraRight = 0; /* */
Expr *pStr1 = 0; /* RHS of LIKE/GLOB operator */
int isComplete = 0; /* RHS of LIKE/GLOB ends with wildcard */
int noCase = 0; /* LIKE/GLOB distinguishes case */
int op; /* Top-level operator. pExpr->op */
Parse *pParse = pWC->pParse; /* Parsing context */
sqlite3 *db = pParse->db; /* Database connection */
Expr *pStr1;
if( db->mallocFailed ){
return;
@@ -1239,10 +1239,12 @@ static void exprAnalyze(
if( pWC->op==TK_AND
&& isLikeOrGlob(pParse, pExpr, &pStr1, &isComplete, &noCase)
){
Expr *pLeft;
Expr *pStr2;
Expr *pNewExpr1, *pNewExpr2;
int idxNew1, idxNew2;
Expr *pLeft; /* LHS of LIKE/GLOB operator */
Expr *pStr2; /* Copy of pStr1 - RHS of LIKE/GLOB operator */
Expr *pNewExpr1;
Expr *pNewExpr2;
int idxNew1;
int idxNew2;
pLeft = pExpr->x.pList->a[1].pExpr;
pStr2 = sqlite3ExprDup(db, pStr1, 0);