mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
When an INSERT is receiving content from a SELECT, run an OP_ReleaseReg opcode
at the top of each iteration of the loop in order to prevent spurious OP_SCopy misuse complaints. Ticket [de4b04149b9fdeae] FossilOrigin-Name: 6afadd3b3a40b0ef29fd14fb24c2a4b9479483e5f8b9125ce02d8daae662207f
This commit is contained in:
14
src/vdbe.c
14
src/vdbe.c
@@ -845,6 +845,20 @@ int sqlite3VdbeExec(
|
||||
** to the current line should be indented for EXPLAIN output.
|
||||
*/
|
||||
case OP_Goto: { /* jump */
|
||||
|
||||
#ifdef SQLITE_DEBUG
|
||||
/* In debuggging mode, when the p5 flags is set on an OP_Goto, that
|
||||
** means we should really jump back to the preceeding OP_ReleaseReg
|
||||
** instruction. */
|
||||
if( pOp->p5 ){
|
||||
assert( pOp->p2 < (int)(pOp - aOp) );
|
||||
assert( pOp->p2 > 1 );
|
||||
pOp = &aOp[pOp->p2 - 2];
|
||||
assert( pOp[1].opcode==OP_ReleaseReg );
|
||||
goto check_for_interrupt;
|
||||
}
|
||||
#endif
|
||||
|
||||
jump_to_p2_and_check_for_interrupt:
|
||||
pOp = &aOp[pOp->p2 - 1];
|
||||
|
||||
|
Reference in New Issue
Block a user