1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

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
This commit is contained in:
drh
2012-09-04 21:34:26 +00:00
parent 8a7c142887
commit 37f58e9902
5 changed files with 29 additions and 21 deletions

View File

@@ -6075,7 +6075,10 @@ case OP_Trace: {
char *zTrace;
char *z;
if( db->xTrace && (zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0 ){
if( db->xTrace
&& !p->doingRerun
&& (zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0
){
z = sqlite3VdbeExpandSql(p, zTrace);
db->xTrace(db->pTraceArg, z);
sqlite3DbFree(db, z);