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

Ensure that there are no bind-parameters or incorrect schema references in

the UPSERT portions of an INSERT within a TRIGGER.

FossilOrigin-Name: d47a6bdda0ce967a7b70bc6eb56278c8b79525622381ff4adcf04525eafc1461
This commit is contained in:
drh
2018-04-23 13:28:55 +00:00
parent 05ef50d08a
commit 4751b87f19
4 changed files with 21 additions and 9 deletions

View File

@@ -604,6 +604,18 @@ int sqlite3FixTriggerStep(
if( sqlite3FixExprList(pFix, pStep->pExprList) ){
return 1;
}
#ifndef SQLITE_OMIT_UPSERT
if( pStep->pUpsert ){
Upsert *pUp = pStep->pUpsert;
if( sqlite3FixExprList(pFix, pUp->pUpsertTarget)
|| sqlite3FixExpr(pFix, pUp->pUpsertTargetWhere)
|| sqlite3FixExprList(pFix, pUp->pUpsertSet)
|| sqlite3FixExpr(pFix, pUp->pUpsertWhere)
){
return 1;
}
}
#endif
pStep = pStep->pNext;
}
return 0;