aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeapi.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2012-09-04 21:34:26 +0000
committerdrh <drh@noemail.net>2012-09-04 21:34:26 +0000
commit37f58e99022b329ba0007bc6509675a22a151eef (patch)
tree7ccefd8417b9fa6c6a1c3172e4cacae32b48b1ce /src/vdbeapi.c
parent8a7c142887077adb590cb95a46941cb5149a7287 (diff)
downloadsqlite-37f58e99022b329ba0007bc6509675a22a151eef.tar.gz
sqlite-37f58e99022b329ba0007bc6509675a22a151eef.zip
Avoid repeating calls to the sqlite3_trace() callback when the same statement
is evaluted multiple times by sqlite3_step() due to an SQLITE_SCHEMA reprepare. FossilOrigin-Name: 39f763bfc04174ee0fe2cdf6a92b7c12f726bd1b
Diffstat (limited to 'src/vdbeapi.c')
-rw-r--r--src/vdbeapi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c
index b9a88a6ab..b48826680 100644
--- a/src/vdbeapi.c
+++ b/src/vdbeapi.c
@@ -478,10 +478,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) ){