1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Omit all sqlite3_trace() output from the triggers associated with

foreign key constraints.

FossilOrigin-Name: fda08e3d10cc850664a356efdafcfc68187053849e1b00991b0b35d892a6776b
This commit is contained in:
drh
2017-12-27 21:30:34 +00:00
parent f259df5fc8
commit e307e11d0a
4 changed files with 32 additions and 14 deletions

View File

@@ -733,9 +733,11 @@ static int codeTriggerProgram(
assert( pParse->okConstFactor==0 );
#ifndef SQLITE_OMIT_TRACE
sqlite3VdbeAddOp4(v, OP_Trace, 0x7fffffff, 1, 0,
sqlite3MPrintf(db, "-- %s", pStep->zSpan),
P4_DYNAMIC);
if( pStep->zSpan ){
sqlite3VdbeAddOp4(v, OP_Trace, 0x7fffffff, 1, 0,
sqlite3MPrintf(db, "-- %s", pStep->zSpan),
P4_DYNAMIC);
}
#endif
switch( pStep->op ){
@@ -878,9 +880,11 @@ static TriggerPrg *codeRowTrigger(
pTab->zName
));
#ifndef SQLITE_OMIT_TRACE
sqlite3VdbeChangeP4(v, -1,
sqlite3MPrintf(db, "-- TRIGGER %s", pTrigger->zName), P4_DYNAMIC
);
if( pTrigger->zName ){
sqlite3VdbeChangeP4(v, -1,
sqlite3MPrintf(db, "-- TRIGGER %s", pTrigger->zName), P4_DYNAMIC
);
}
#endif
/* If one was specified, code the WHEN clause. If it evaluates to false