aboutsummaryrefslogtreecommitdiff
path: root/src/update.c
diff options
context:
space:
mode:
authordan <Dan Kennedy>2023-08-10 17:07:34 +0000
committerdan <Dan Kennedy>2023-08-10 17:07:34 +0000
commit6de6121e36e33d214c5f19e9197f7cee0fb60d7f (patch)
tree165e77da459e2813194b6b46c96be7d2e47f62c3 /src/update.c
parent9a897cb0dea3fe2aa17e2b1d1155fe016447fa76 (diff)
parent80c438613a687d41ce820f113a2b20e1aade93a6 (diff)
downloadsqlite-6de6121e36e33d214c5f19e9197f7cee0fb60d7f.tar.gz
sqlite-6de6121e36e33d214c5f19e9197f7cee0fb60d7f.zip
Merge latest trunk changes into this branch.
FossilOrigin-Name: 3ed89c344fcb3b7ee8b764d95144643e42e053e1116150d6eda8355fbd6669df
Diffstat (limited to 'src/update.c')
-rw-r--r--src/update.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/update.c b/src/update.c
index a79286224..3b3c2f838 100644
--- a/src/update.c
+++ b/src/update.c
@@ -741,7 +741,7 @@ void sqlite3Update(
&& !hasFK
&& !chngKey
&& !bReplace
- && (sNC.ncFlags & NC_Subquery)==0
+ && (pWhere==0 || !ExprHasProperty(pWhere, EP_Subquery))
){
flags |= WHERE_ONEPASS_MULTIROW;
}
@@ -1259,7 +1259,9 @@ static void updateVirtualTable(
sqlite3ExprDup(db, pChanges->a[aXRef[i]].pExpr, 0)
);
}else{
- pList = sqlite3ExprListAppend(pParse, pList, exprRowColumn(pParse, i));
+ Expr *pRow = exprRowColumn(pParse, i);
+ if( pRow ) pRow->op2 = OPFLAG_NOCHNG;
+ pList = sqlite3ExprListAppend(pParse, pList, pRow);
}
}