aboutsummaryrefslogtreecommitdiff
path: root/src/insert.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-10-24 19:35:26 +0000
committerdrh <drh@noemail.net>2019-10-24 19:35:26 +0000
commit06baba54b4d097113e8a425010d31f044df57f4b (patch)
tree7080ab7df1e0b3735826f5a9b500dcc5305845ce /src/insert.c
parent31269a9f5ff767cb1b9e910b41124fa11aca32f2 (diff)
downloadsqlite-06baba54b4d097113e8a425010d31f044df57f4b.tar.gz
sqlite-06baba54b4d097113e8a425010d31f044df57f4b.zip
Correction to check-in [bec5b6d4d083556d] so that it detects *all*
triggers that might perturb the insertion cursor. Ticket [50c09fc2cf0d91ce]. FossilOrigin-Name: 521f1d36282549488a47a434484a24924ee970d29f05a8ae499b7d536bcd692b
Diffstat (limited to 'src/insert.c')
-rw-r--r--src/insert.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/insert.c b/src/insert.c
index 3bb1ee706..77b402c7e 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -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
);