1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Ensure that any error encountered while coding a trigger program is transfered to the main Parse structure before it is used with any other routine that might set the error code.

FossilOrigin-Name: 4293656578811b500786335de7cc9ac0d6ccc6fb273b9419a86968a095404c43
This commit is contained in:
dan
2022-01-24 11:25:42 +00:00
parent d48e88e56d
commit f5bc444077
3 changed files with 9 additions and 9 deletions

View File

@@ -1179,6 +1179,7 @@ static TriggerPrg *codeRowTrigger(
/* Code the trigger program into the sub-vdbe. */
codeTriggerProgram(pSubParse, pTrigger->step_list, orconf);
transferParseError(pParse, pSubParse);
/* Insert an OP_Halt at the end of the sub-program. */
if( iEndTrigger ){
@@ -1187,7 +1188,6 @@ static TriggerPrg *codeRowTrigger(
sqlite3VdbeAddOp0(v, OP_Halt);
VdbeComment((v, "End: %s.%s", pTrigger->zName, onErrorText(orconf)));
transferParseError(pParse, pSubParse);
if( db->mallocFailed==0 && pParse->nErr==0 ){
pProgram->aOp = sqlite3VdbeTakeOpArray(v, &pProgram->nOp, &pTop->nMaxArg);
}