Correction to check-in [bec5b6d4d083556d] so that it detects *all*

triggers that might perturb the insertion cursor.
Ticket [50c09fc2cf0d91ce].

FossilOrigin-Name: 521f1d36282549488a47a434484a24924ee970d29f05a8ae499b7d536bcd692b
This commit is contained in:
drh
2019-10-24 19:35:26 +00:00
parent 31269a9f5f
commit 06baba54b4
6 changed files with 35 additions and 15 deletions
+1 -3
View File
@@ -1058,9 +1058,7 @@ void sqlite3Insert(
** cursor that is disturbed. And these instructions both clear the
** VdbeCursor.seekResult variable, disabling the OPFLAG_USESEEKRESULT
** functionality. */
bUseSeek = (isReplace==0 || (pTrigger==0 &&
((db->flags & SQLITE_ForeignKeys)==0 || sqlite3FkReferences(pTab)==0)
));
bUseSeek = (isReplace==0 || !sqlite3VdbeHasSubProgram(v));
sqlite3CompleteInsertion(pParse, pTab, iDataCur, iIdxCur,
regIns, aRegIdx, 0, appendFlag, bUseSeek
);