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

Apply the UPDATE-FROM file from check-in [98b3816bbaf539ea] to

update-delete-limit builds.

FossilOrigin-Name: 7e87892c249f023ee9ed1d5f75a9ad8db10fb38f14dd9e6954b12b9b28400b07
This commit is contained in:
drh
2022-05-28 14:03:23 +00:00
parent 1a66ff359f
commit 1943005f62
3 changed files with 20 additions and 9 deletions

View File

@@ -924,7 +924,18 @@ where_opt_ret(A) ::= WHERE expr(X) RETURNING selcollist(Y).
cmd ::= with UPDATE orconf(R) xfullname(X) indexed_opt(I) SET setlist(Y) from(F)
where_opt_ret(W) orderby_opt(O) limit_opt(L). {
sqlite3SrcListIndexedBy(pParse, X, &I);
X = sqlite3SrcListAppendList(pParse, X, F);
if( F ){
SrcList *pFromClause = F;
if( pFromClause->nSrc>1 ){
Select *pSubquery;
Token as;
pSubquery = sqlite3SelectNew(pParse,0,pFromClause,0,0,0,0,SF_NestedFrom,0);
as.n = 0;
as.z = 0;
pFromClause = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&as,pSubquery,0);
}
X = sqlite3SrcListAppendList(pParse, X, pFromClause);
}
sqlite3ExprListCheckLength(pParse,Y,"set list");
#ifndef SQLITE_ENABLE_UPDATE_DELETE_LIMIT
if( O || L ){