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

Fix a problem by renaming a column when the schema contains an trigger program

featuring an UPSERT that uses an "excluded.*" reference to a different table.

FossilOrigin-Name: 83d5f5abce6be2f6d342a6fc68839289400d7bcb80eaa38194789142c93a80c3
This commit is contained in:
dan
2018-08-24 20:20:33 +00:00
parent 85a9d508df
commit aa42e9816b
4 changed files with 17 additions and 13 deletions

View File

@@ -1361,11 +1361,9 @@ static void renameColumnFunc(
if( pStep->pUpsert ){
Upsert *pUpsert = pStep->pUpsert;
assert( rc==SQLITE_OK );
if( pTarget==pTab ){
pUpsert->pUpsertSrc = &sSrc;
sNC.uNC.pUpsert = pUpsert;
sNC.ncFlags = NC_UUpsert;
}
pUpsert->pUpsertSrc = &sSrc;
sNC.uNC.pUpsert = pUpsert;
sNC.ncFlags = NC_UUpsert;
rc = sqlite3ResolveExprListNames(&sNC, pUpsert->pUpsertTarget);
if( rc==SQLITE_OK ){
ExprList *pUpsertSet = pUpsert->pUpsertSet;