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

Fix another problem with RETURNING clauses in UPDATEs against tables with virtual columns.

FossilOrigin-Name: f0ef5c76ab1a6568b9148b928277bf589d4cb7033c0acf3e6323879b656d8bd1
This commit is contained in:
dan
2021-03-05 15:29:22 +00:00
parent a7e16a2f05
commit 0d08072b68
4 changed files with 42 additions and 13 deletions

View File

@@ -436,8 +436,8 @@ static int lookupName(
pExpr->y.pTab = pTab;
if( pParse->bReturning ){
eNewExprOp = TK_REGISTER;
pExpr->iTable = pNC->uNC.iBaseReg + (pTab->nCol+1)*pExpr->iTable
+ iCol + 1;
pExpr->iTable = pNC->uNC.iBaseReg + (pTab->nCol+1)*pExpr->iTable +
sqlite3TableColumnToStorage(pTab, iCol) + 1;
}else{
pExpr->iColumn = (i16)iCol;
eNewExprOp = TK_TRIGGER;