mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-10 01:02:56 +03:00
Fix another problem with ALTER TABLE and vector UPDATE statements within triggers.
FossilOrigin-Name: a0df216f7c3f8963efba0b1ffee65d6a63309d846ffdcf2d2932cb4f1d4967b7
This commit is contained in:
14
src/expr.c
14
src/expr.c
@@ -516,12 +516,16 @@ Expr *sqlite3ExprForVectorField(
|
||||
pRet->pLeft = pVector;
|
||||
}
|
||||
}else{
|
||||
if( pVector->op==TK_VECTOR ) pVector = pVector->x.pList->a[iField].pExpr;
|
||||
pRet = sqlite3ExprDup(pParse->db, pVector, 0);
|
||||
if( pRet && IN_RENAME_OBJECT ){
|
||||
SWAP(Expr, *pRet, *pVector);
|
||||
sqlite3RenameTokenRemap(pParse, pRet, pVector);
|
||||
if( pVector->op==TK_VECTOR ){
|
||||
Expr **ppVector = &pVector->x.pList->a[iField].pExpr;
|
||||
pVector = *ppVector;
|
||||
if( IN_RENAME_OBJECT ){
|
||||
/* This must be a vector UPDATE inside a trigger */
|
||||
*ppVector = 0;
|
||||
return pVector;
|
||||
}
|
||||
}
|
||||
pRet = sqlite3ExprDup(pParse->db, pVector, 0);
|
||||
}
|
||||
return pRet;
|
||||
}
|
||||
|
Reference in New Issue
Block a user