mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-10 01:02:56 +03:00
Fix a problem in ALTER TABLE causing table or column references in sub-selects ton the RHS of a vector SET clause in an UPDATE within a trigger (i.e. "SET (a,b) = ( (SELECT...), <expr> )").
FossilOrigin-Name: 255b0eeed113d83b474efc5bc8fc790a270bc43ee598df4b2c378e1ad2d729b7
This commit is contained in:
@@ -518,7 +518,10 @@ Expr *sqlite3ExprForVectorField(
|
||||
}else{
|
||||
if( pVector->op==TK_VECTOR ) pVector = pVector->x.pList->a[iField].pExpr;
|
||||
pRet = sqlite3ExprDup(pParse->db, pVector, 0);
|
||||
sqlite3RenameTokenRemap(pParse, pRet, pVector);
|
||||
if( IN_RENAME_OBJECT && pRet ){
|
||||
SWAP(Expr, *pRet, *pVector);
|
||||
sqlite3RenameTokenRemap(pParse, pRet, pVector);
|
||||
}
|
||||
}
|
||||
return pRet;
|
||||
}
|
||||
|
Reference in New Issue
Block a user