diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/btree.c | 2 | ||||
-rw-r--r-- | src/os_unix.c | 3 | ||||
-rw-r--r-- | src/where.c | 18 |
3 files changed, 13 insertions, 10 deletions
diff --git a/src/btree.c b/src/btree.c index 7c95d68dc..7e495061a 100644 --- a/src/btree.c +++ b/src/btree.c @@ -6454,7 +6454,7 @@ int sqlite3BtreeInsert( ){ int rc; int loc = seekResult; /* -1: before desired location +1: after */ - int szNew; + int szNew = 0; int idx; MemPage *pPage; Btree *p = pCur->pBtree; diff --git a/src/os_unix.c b/src/os_unix.c index 37447ac40..b31fbab21 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -2542,7 +2542,8 @@ static int afpLock(sqlite3_file *id, int locktype){ ** operating system calls for the specified lock. */ if( locktype==SHARED_LOCK ){ - int lk, lrc1, lrc2, lrc1Errno; + int lk, lrc1, lrc2; + int lrc1Errno = 0; /* Now get the read-lock SHARED_LOCK */ /* note that the quality of the randomness doesn't matter that much */ diff --git a/src/where.c b/src/where.c index 70642fc5b..f17853d5f 100644 --- a/src/where.c +++ b/src/where.c @@ -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); |