diff options
Diffstat (limited to 'src/insert.c')
-rw-r--r-- | src/insert.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/insert.c b/src/insert.c index 91004fb47..6de304848 100644 --- a/src/insert.c +++ b/src/insert.c @@ -1331,7 +1331,9 @@ void sqlite3Insert( sqlite3GenerateConstraintChecks(pParse, pTab, aRegIdx, iDataCur, iIdxCur, regIns, 0, ipkColumn>=0, onError, endOfLoop, &isReplace, 0, pUpsert ); - sqlite3FkCheck(pParse, pTab, 0, regIns, 0, 0); + if( db->flags & SQLITE_ForeignKeys ){ + sqlite3FkCheck(pParse, pTab, 0, regIns, 0, 0); + } /* Set the OPFLAG_USESEEKRESULT flag if either (a) there are no REPLACE ** constraints or (b) there are no triggers and this table is not a |