mirror of
https://github.com/sqlite/sqlite.git
synced 2025-09-09 21:09:38 +03:00
Fix a problem with renaming a column that occurs as an "excluded.colname"
construction in an UPSERT that is part of a trigger program. FossilOrigin-Name: bb2f7234968157b605522dea8e115d8772ab4234147894089d6e48fedf5d6a5d
This commit is contained in:
@@ -349,9 +349,15 @@ static int lookupName(
|
||||
#ifndef SQLITE_OMIT_UPSERT
|
||||
if( pExpr->iTable==2 ){
|
||||
testcase( iCol==(-1) );
|
||||
pExpr->iTable = pNC->uNC.pUpsert->regData + iCol;
|
||||
eNewExprOp = TK_REGISTER;
|
||||
ExprSetProperty(pExpr, EP_Alias);
|
||||
if( IN_RENAME_COLUMN ){
|
||||
pExpr->iColumn = iCol;
|
||||
pExpr->pTab = pTab;
|
||||
eNewExprOp = TK_COLUMN;
|
||||
}else{
|
||||
pExpr->iTable = pNC->uNC.pUpsert->regData + iCol;
|
||||
eNewExprOp = TK_REGISTER;
|
||||
ExprSetProperty(pExpr, EP_Alias);
|
||||
}
|
||||
}else
|
||||
#endif /* SQLITE_OMIT_UPSERT */
|
||||
{
|
||||
|
Reference in New Issue
Block a user