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:
12
src/attach.c
12
src/attach.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user