1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Fix generated columns so that they play well with upsert.

See the [https://sqlite.org/forum/forumpost/73b9a8ccfb|forum post]
by "iffycan" for details.

FossilOrigin-Name: fa9d93cf32fac4b86044acf5d1b9ea2f36e964ed7142cf1d270986c9ef3fb766
This commit is contained in:
drh
2020-06-29 20:26:50 +00:00
parent ec43d8040a
commit b8fec21983
4 changed files with 36 additions and 8 deletions

View File

@@ -423,7 +423,8 @@ static int lookupName(
pExpr->y.pTab = pTab;
eNewExprOp = TK_COLUMN;
}else{
pExpr->iTable = pNC->uNC.pUpsert->regData + iCol;
pExpr->iTable = pNC->uNC.pUpsert->regData +
sqlite3TableColumnToStorage(pTab, iCol);
eNewExprOp = TK_REGISTER;
ExprSetProperty(pExpr, EP_Alias);
}