aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordan <Dan Kennedy>2024-03-14 19:01:17 +0000
committerdan <Dan Kennedy>2024-03-14 19:01:17 +0000
commit400992b1c4e48b10bbfb29301f5582f74e3188a3 (patch)
treee484cb27588e0a2e87c961c69a7fddedff1eedc2 /src
parentf0f43238248e3e6491686acf1104217face58b00 (diff)
downloadsqlite-400992b1c4e48b10bbfb29301f5582f74e3188a3.tar.gz
sqlite-400992b1c4e48b10bbfb29301f5582f74e3188a3.zip
Fix a problem handling "INSERT INTO ... SELECT ... UNION VALUES(...), (...)" and similar statements.
FossilOrigin-Name: e8a2a8198a97046ff376bc5d38e4bc0a24fcac79f5a0dadb9d29d953a862a012
Diffstat (limited to 'src')
-rw-r--r--src/insert.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/insert.c b/src/insert.c
index 3fc5f6ccd..428d5c194 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -1084,7 +1084,10 @@ void sqlite3Insert(
int regYield; /* Register holding co-routine entry-point */
int rc; /* Result code */
- if( pSelect->pSrc->nSrc==1 && pSelect->pSrc->a[0].fg.viaCoroutine ){
+ if( pSelect->pSrc->nSrc==1
+ && pSelect->pSrc->a[0].fg.viaCoroutine
+ && pSelect->pPrior==0
+ ){
SrcItem *pItem = &pSelect->pSrc->a[0];
dest.iSDParm = regYield = pItem->regReturn;
regFromSelect = pItem->regResult;