diff options
author | drh <drh@noemail.net> | 2018-04-20 13:18:51 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-04-20 13:18:51 +0000 |
commit | 7fc3aba8623e703cfdb2eade8ec3d1362da38907 (patch) | |
tree | 52282a5e1fb3fdfc8ae4575116ef4e9e0375ffb2 /src/sqliteInt.h | |
parent | 2ac4e5cca9b882d142fd21c83a0e930f9bbd56da (diff) | |
download | sqlite-7fc3aba8623e703cfdb2eade8ec3d1362da38907.tar.gz sqlite-7fc3aba8623e703cfdb2eade8ec3d1362da38907.zip |
Enhance UPSERT so that the UPDATE uses the same set of cursors as the INSERT.
FossilOrigin-Name: c37f39d18d41ae5ba6c4561d87cbbf71f3b6896b86cc5cff9cdf046b02dc521a
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 73cb6299d..ccbf8467f 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -2743,8 +2743,14 @@ struct Upsert { Index *pUpsertIdx; /* Constraint that pUpsertTarget identifies */ ExprList *pUpsertSet; /* The SET clause from an ON CONFLICT UPDATE */ Expr *pUpsertWhere; /* WHERE clause for the ON CONFLICT UPDATE */ + /* 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. + ** Upsert owns the memory allocated above, but not the memory below. */ SrcList *pUpsertSrc; /* Table to be updated */ int regData; /* First register holding array of VALUES */ + int iDataCur; /* Index of the data cursor */ + int iIdxCur; /* Index of the first index cursor */ }; /* |