aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2020-12-08 14:29:03 +0000
committerdrh <drh@noemail.net>2020-12-08 14:29:03 +0000
commit2549e4cc2fef9fc969a9efdc723c2bcf1ac69f1f (patch)
tree74458e0878b5433b275bf3387d3c1b1c777c1337 /src/sqliteInt.h
parent0dffe465f76869016bc8b849f160c3d1a40505e8 (diff)
downloadsqlite-2549e4cc2fef9fc969a9efdc723c2bcf1ac69f1f.tar.gz
sqlite-2549e4cc2fef9fc969a9efdc723c2bcf1ac69f1f.zip
Enhance UPSERT parsing to allow multiple ON CONFLICT clauses. Only the
very last clause may omit the conflict target, but the conflict target may now be omitted for the DO UPDATE resolution. FossilOrigin-Name: 2ca62f4c71df6544cb8039bdc80e3701d09697c38800534371f6d44532fcffae
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r--src/sqliteInt.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 438f79c09..68c868060 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -3071,6 +3071,7 @@ struct Upsert {
Expr *pUpsertTargetWhere; /* WHERE clause for partial index targets */
ExprList *pUpsertSet; /* The SET clause from an ON CONFLICT UPDATE */
Expr *pUpsertWhere; /* WHERE clause for the ON CONFLICT UPDATE */
+ Upsert *pNextUpsert; /* Next ON CONFLICT clause in the list */
/* The fields above comprise the parse tree for the upsert clause.
** The fields below are used to transfer information from the INSERT
** processing down into the UPDATE processing while generating code.
@@ -4824,15 +4825,15 @@ const char *sqlite3JournalModename(int);
#define sqlite3WithDelete(x,y)
#endif
#ifndef SQLITE_OMIT_UPSERT
- Upsert *sqlite3UpsertNew(sqlite3*,ExprList*,Expr*,ExprList*,Expr*);
+ Upsert *sqlite3UpsertNew(sqlite3*,ExprList*,Expr*,ExprList*,Expr*,Upsert*);
void sqlite3UpsertDelete(sqlite3*,Upsert*);
Upsert *sqlite3UpsertDup(sqlite3*,Upsert*);
int sqlite3UpsertAnalyzeTarget(Parse*,SrcList*,Upsert*);
void sqlite3UpsertDoUpdate(Parse*,Upsert*,Table*,Index*,int);
#else
-#define sqlite3UpsertNew(v,w,x,y,z) ((Upsert*)0)
+#define sqlite3UpsertNew(u,v,w,x,y,z) ((Upsert*)0)
#define sqlite3UpsertDelete(x,y)
-#define sqlite3UpsertDup(x,y) ((Upsert*)0)
+#define sqlite3UpsertDup(x,y) ((Upsert*)0)
#endif