aboutsummaryrefslogtreecommitdiff
path: root/src/insert.c
diff options
context:
space:
mode:
authordrh <>2024-03-08 14:01:48 +0000
committerdrh <>2024-03-08 14:01:48 +0000
commit926fb60b05be799ff6e9f0013d2a0f393cfd380c (patch)
treec0da63211be0e1ec778187ea194e0917acccfc43 /src/insert.c
parentb89aa10cd0d980563df54b5ad0fb2214f06c7c80 (diff)
downloadsqlite-926fb60b05be799ff6e9f0013d2a0f393cfd380c.tar.gz
sqlite-926fb60b05be799ff6e9f0013d2a0f393cfd380c.zip
Silently ignore redundant ON CONFLICT clauses in an UPSERT. Only the first
ON CONFLICT for each index is active. Do not issue an error, since that might break legacy queries. But ignore the redundant ON CONFLICT clauses to prevent problems such as described in [forum:/forumpost/919c6579c8|forum post 919c6579c8]. FossilOrigin-Name: d0ea6b6ba64dba9d68c2b391ccf1171ea96fcdd7409dafdb2b697accb00246b8
Diffstat (limited to 'src/insert.c')
-rw-r--r--src/insert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/insert.c b/src/insert.c
index 1c31ca233..095298b90 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -1086,7 +1086,7 @@ void sqlite3Insert(
pNx->iDataCur = iDataCur;
pNx->iIdxCur = iIdxCur;
if( pNx->pUpsertTarget ){
- if( sqlite3UpsertAnalyzeTarget(pParse, pTabList, pNx) ){
+ if( sqlite3UpsertAnalyzeTarget(pParse, pTabList, pNx, pUpsert) ){
goto insert_cleanup;
}
}