1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Make sure every co-routines has its own set of temporary registers and does

not share temporaries, since a co-routine might expect the content of a
temporary register to be preserved across an OP_Yield.
Proposed fix for ticket [d06a25c84454a].

FossilOrigin-Name: ca72be8618e5d466d6f35819ca8bbd2b84269959
This commit is contained in:
drh
2016-02-09 02:12:20 +00:00
parent e48f1ed9bf
commit 2fade2f791
8 changed files with 54 additions and 18 deletions

View File

@@ -685,7 +685,7 @@ void sqlite3Insert(
rc = sqlite3Select(pParse, pSelect, &dest);
regFromSelect = dest.iSdst;
if( rc || db->mallocFailed || pParse->nErr ) goto insert_cleanup;
sqlite3VdbeAddOp1(v, OP_EndCoroutine, regYield);
sqlite3VdbeEndCoroutine(v, regYield);
sqlite3VdbeJumpHere(v, addrTop - 1); /* label B: */
assert( pSelect->pEList );
nColumn = pSelect->pEList->nExpr;