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

Side by Side Diff: third_party/sqlite/src/src/vdbeapi.c

Issue 15070002: Backport SQLite memcmp patch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary variable. Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/src/src/os_unix.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ** 2004 May 26 2 ** 2004 May 26
3 ** 3 **
4 ** The author disclaims copyright to this source code. In place of 4 ** The author disclaims copyright to this source code. In place of
5 ** a legal notice, here is a blessing: 5 ** a legal notice, here is a blessing:
6 ** 6 **
7 ** May you do good and not evil. 7 ** May you do good and not evil.
8 ** May you find forgiveness for yourself and forgive others. 8 ** May you find forgiveness for yourself and forgive others.
9 ** May you share freely, never taking more than you give. 9 ** May you share freely, never taking more than you give.
10 ** 10 **
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 */ 1215 */
1216 int sqlite3VdbeParameterIndex(Vdbe *p, const char *zName, int nName){ 1216 int sqlite3VdbeParameterIndex(Vdbe *p, const char *zName, int nName){
1217 int i; 1217 int i;
1218 if( p==0 ){ 1218 if( p==0 ){
1219 return 0; 1219 return 0;
1220 } 1220 }
1221 createVarMap(p); 1221 createVarMap(p);
1222 if( zName ){ 1222 if( zName ){
1223 for(i=0; i<p->nVar; i++){ 1223 for(i=0; i<p->nVar; i++){
1224 const char *z = p->azVar[i]; 1224 const char *z = p->azVar[i];
1225 if( z && memcmp(z,zName,nName)==0 && z[nName]==0 ){ 1225 if( z && strncmp(z,zName,nName)==0 && z[nName]==0 ){
1226 return i+1; 1226 return i+1;
1227 } 1227 }
1228 } 1228 }
1229 } 1229 }
1230 return 0; 1230 return 0;
1231 } 1231 }
1232 int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){ 1232 int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
1233 return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName)); 1233 return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName));
1234 } 1234 }
1235 1235
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 1317
1318 /* 1318 /*
1319 ** Return the value of a status counter for a prepared statement 1319 ** Return the value of a status counter for a prepared statement
1320 */ 1320 */
1321 int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){ 1321 int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
1322 Vdbe *pVdbe = (Vdbe*)pStmt; 1322 Vdbe *pVdbe = (Vdbe*)pStmt;
1323 int v = pVdbe->aCounter[op-1]; 1323 int v = pVdbe->aCounter[op-1];
1324 if( resetFlag ) pVdbe->aCounter[op-1] = 0; 1324 if( resetFlag ) pVdbe->aCounter[op-1] = 0;
1325 return v; 1325 return v;
1326 } 1326 }
OLDNEW
« no previous file with comments | « third_party/sqlite/src/src/os_unix.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698