mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-15 11:41:13 +03:00
Fix another problem with ALTER TABLE and UPDATE...FROM in triggers.
FossilOrigin-Name: 33cf12235e6469ba17cfb72cef0e480dfd0dea81ed412fb1fb24b05dbeb8dc02
This commit is contained in:
@@ -1318,21 +1318,18 @@ static int renameResolveTrigger(Parse *pParse){
|
||||
SrcList *pSrc = sqlite3TriggerStepSrc(pParse, pStep);
|
||||
if( pSrc ){
|
||||
Select *pSel = sqlite3SelectNew(
|
||||
pParse, pStep->pExprList, pSrc, pStep->pWhere, 0, 0, 0, 0, 0
|
||||
pParse, pStep->pExprList, pSrc, 0, 0, 0, 0, 0, 0
|
||||
);
|
||||
if( pSel==0 ){
|
||||
pStep->pExprList = 0;
|
||||
pStep->pWhere = 0;
|
||||
pSrc = 0;
|
||||
rc = SQLITE_NOMEM;
|
||||
}else{
|
||||
sqlite3SelectPrep(pParse, pSel, 0);
|
||||
rc = pParse->nErr ? SQLITE_ERROR : SQLITE_OK;
|
||||
assert( pStep->pExprList==0 || pStep->pExprList==pSel->pEList );
|
||||
assert( pStep->pWhere==pSel->pWhere );
|
||||
assert( pSrc==pSel->pSrc );
|
||||
if( pStep->pExprList ) pSel->pEList = 0;
|
||||
pSel->pWhere = 0;
|
||||
pSel->pSrc = 0;
|
||||
sqlite3SelectDelete(db, pSel);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user