aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordan <Dan Kennedy>2024-03-12 20:10:46 +0000
committerdan <Dan Kennedy>2024-03-12 20:10:46 +0000
commit5badd048d2e63b900683eefd01a3427a3d82b277 (patch)
tree8a99f081383e80653b42eaddcbeadf77d3172e98 /src
parent815e055bff42d57f49cf46cc70771cdcf5930d83 (diff)
downloadsqlite-5badd048d2e63b900683eefd01a3427a3d82b277.tar.gz
sqlite-5badd048d2e63b900683eefd01a3427a3d82b277.zip
Correctly initialize the SrcItem.iCursor field to -1 when creating a co-routine from a multi-values VALUES clause.
FossilOrigin-Name: c32953ff6d72910815eaff29ab1b790c412e1a741d02c03c5911dda0c08e5130
Diffstat (limited to 'src')
-rw-r--r--src/insert.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/insert.c b/src/insert.c
index 7b253e926..071d9aeff 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -635,6 +635,7 @@ Select *sqlite3MultiValues(Parse *pParse, Select *pLeft, ExprList *pRow){
p->fg.viaCoroutine = 1;
p->addrFillSub = sqlite3VdbeCurrentAddr(v) + 1;
p->regReturn = ++pParse->nMem;
+ p->iCursor = -1;
sqlite3VdbeAddOp3(v,OP_InitCoroutine,p->regReturn,0,p->addrFillSub);
sqlite3SelectDestInit(&dest, SRT_Coroutine, p->regReturn);