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

Avoid unnecessary calls to sqlite3CodeRowTrigger().

FossilOrigin-Name: 27c174dbd0e7ba029d13fb005fc950ac99eb6aee31903ee3acfc88c262d13f6a
This commit is contained in:
drh
2023-06-20 15:48:24 +00:00
parent bcc76bd419
commit f6e04b6e29
4 changed files with 17 additions and 13 deletions

View File

@@ -1117,8 +1117,10 @@ void sqlite3Update(
sqlite3VdbeAddOp2(v, OP_AddImm, regRowCount, 1);
}
sqlite3CodeRowTrigger(pParse, pTrigger, TK_UPDATE, pChanges,
TRIGGER_AFTER, pTab, regOldRowid, onError, labelContinue);
if( pTrigger ){
sqlite3CodeRowTrigger(pParse, pTrigger, TK_UPDATE, pChanges,
TRIGGER_AFTER, pTab, regOldRowid, onError, labelContinue);
}
/* Repeat the above with the next record to be updated, until
** all record selected by the WHERE clause have been updated.