diff options
author | Hans-Christoph Steiner <hans@eds.org> | 2013-08-13 15:43:01 -0400 |
---|---|---|
committer | Hans-Christoph Steiner <hans@eds.org> | 2013-08-13 15:43:01 -0400 |
commit | 4228998fd796fa2f9e84fb73632e0a07cc7cd188 (patch) | |
tree | 15b2336f351468fedd0c39e9de4ad905a686f3b0 /src/vdbeapi.c | |
parent | bdee7cf7d974b2f70d5934786c5666006e7360be (diff) | |
parent | 08119c361d1181b3e8f1abb429236e488a664753 (diff) |
Merge tag 'upstream/2.2.1'
Upstream version 2.2.1
# gpg: Signature made Tue 13 Aug 2013 03:42:56 PM EDT using RSA key ID 374BBE81
# gpg: Good signature from "Hans-Christoph Steiner <hans@at.or.at>"
# gpg: aka "[jpeg image of size 5408]"
# gpg: aka "Hans-Christoph Steiner <hs420@nyu.edu>"
# gpg: aka "Hans-Christoph Steiner <hans@eds.org>"
# gpg: aka "Hans-Christoph Steiner <hans@guardianproject.info>"
# gpg: aka "Hans-Christoph Steiner <hansi@nyu.edu>"
# gpg: aka "Hans-Christoph Steiner <hans@guardianproject.info>"
Diffstat (limited to 'src/vdbeapi.c')
-rw-r--r-- | src/vdbeapi.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c index b9a88a6..7c861e2 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -445,7 +445,7 @@ end_of_step: assert( p->rc!=SQLITE_ROW && p->rc!=SQLITE_DONE ); if( p->isPrepareV2 && rc!=SQLITE_ROW && rc!=SQLITE_DONE ){ /* If this statement was prepared using sqlite3_prepare_v2(), and an - ** error has occured, then return the error code in p->rc to the + ** error has occurred, then return the error code in p->rc to the ** caller. Set the error code in the database handle to the same value. */ rc = sqlite3VdbeTransferError(p); @@ -454,14 +454,6 @@ end_of_step: } /* -** The maximum number of times that a statement will try to reparse -** itself before giving up and returning SQLITE_SCHEMA. -*/ -#ifndef SQLITE_MAX_SCHEMA_RETRY -# define SQLITE_MAX_SCHEMA_RETRY 5 -#endif - -/* ** This is the top-level implementation of sqlite3_step(). Call ** sqlite3Step() to do most of the work. If a schema error occurs, ** call sqlite3Reprepare() and try again. @@ -478,10 +470,12 @@ int sqlite3_step(sqlite3_stmt *pStmt){ } db = v->db; sqlite3_mutex_enter(db->mutex); + v->doingRerun = 0; while( (rc = sqlite3Step(v))==SQLITE_SCHEMA && cnt++ < SQLITE_MAX_SCHEMA_RETRY && (rc2 = rc = sqlite3Reprepare(v))==SQLITE_OK ){ sqlite3_reset(pStmt); + v->doingRerun = 1; assert( v->expired==0 ); } if( rc2!=SQLITE_OK && ALWAYS(v->isPrepareV2) && ALWAYS(db->pErr) ){ @@ -1196,7 +1190,7 @@ int sqlite3VdbeParameterIndex(Vdbe *p, const char *zName, int nName){ if( zName ){ for(i=0; i<p->nzVar; i++){ const char *z = p->azVar[i]; - if( z && memcmp(z,zName,nName)==0 && z[nName]==0 ){ + if( z && strncmp(z,zName,nName)==0 && z[nName]==0 ){ return i+1; } } |