On 10/7/15, Aki Tuomi <cmouse at cmouse.fi> wrote: > > Abusing bit more it would seem that when it's not logging, it's going thru > sqlite3Reprepare and doing a rerun. Wonder if this causes the logging be > suppressed? See http://p.ip.fi/bt6b >
Try the patch below to see if it makes a difference: Index: src/vdbe.c ================================================================== --- src/vdbe.c +++ src/vdbe.c @@ -6545,14 +6545,17 @@ char *zTrace; char *z; #ifndef SQLITE_OMIT_TRACE if( db->xTrace - && !p->doingRerun && (zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0 ){ - z = sqlite3VdbeExpandSql(p, zTrace); + if( p->doingRerun ){ + z = sqlite3MPrintf(db, "-- rerun: %s", zTrace); + }else{ + z = sqlite3VdbeExpandSql(p, zTrace); + } db->xTrace(db->pTraceArg, z); sqlite3DbFree(db, z); } #ifdef SQLITE_USE_FCNTL_TRACE zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql); -- D. Richard Hipp drh at sqlite.org