Index: third_party/sqlite/sqlite-src-3070603/src/expr.c |
diff --git a/third_party/sqlite/src/src/expr.c b/third_party/sqlite/sqlite-src-3070603/src/expr.c |
similarity index 99% |
copy from third_party/sqlite/src/src/expr.c |
copy to third_party/sqlite/sqlite-src-3070603/src/expr.c |
index 9d1193b35825ff7ea5b10d9e391ca425a1771840..c0e9ba6fd503da0316f0b21a33f90aad8ed84329 100644 |
--- a/third_party/sqlite/src/src/expr.c |
+++ b/third_party/sqlite/sqlite-src-3070603/src/expr.c |
@@ -578,10 +578,12 @@ void sqlite3ExprAssignVarNumber(Parse *pParse, Expr *pExpr){ |
** has never appeared before, reuse the same variable number |
*/ |
int i; |
+ u32 n; |
+ n = sqlite3Strlen30(z); |
for(i=0; i<pParse->nVarExpr; i++){ |
Expr *pE = pParse->apVarExpr[i]; |
assert( pE!=0 ); |
- if( strcmp(pE->u.zToken, z)==0 ){ |
+ if( memcmp(pE->u.zToken, z, n)==0 && pE->u.zToken[n]==0 ){ |
pExpr->iColumn = pE->iColumn; |
break; |
} |
@@ -779,9 +781,7 @@ static Expr *exprDup(sqlite3 *db, Expr *p, int flags, u8 **pzBuffer){ |
}else{ |
int nSize = exprStructSize(p); |
memcpy(zAlloc, p, nSize); |
- if( EXPR_FULLSIZE>nSize ){ |
- memset(&zAlloc[nSize], 0, EXPR_FULLSIZE-nSize); |
- } |
+ memset(&zAlloc[nSize], 0, EXPR_FULLSIZE-nSize); |
} |
/* Set the EP_Reduced, EP_TokenOnly, and EP_Static flags appropriately. */ |