Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: third_party/sqlite/sqlite-src-3070603/src/expr.c

Issue 826543003: [sql] Import reference version of SQLite 3.7.6.3. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: gitignore forgot some files for me. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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. */
« no previous file with comments | « third_party/sqlite/sqlite-src-3070603/src/delete.c ('k') | third_party/sqlite/sqlite-src-3070603/src/fault.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698