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

Fix a problem handling "INSERT INTO ... SELECT ... UNION VALUES(...), (...)" and similar statements.

FossilOrigin-Name: e8a2a8198a97046ff376bc5d38e4bc0a24fcac79f5a0dadb9d29d953a862a012
This commit is contained in:
dan
2024-03-14 19:01:17 +00:00
parent f0f4323824
commit 400992b1c4
4 changed files with 26 additions and 9 deletions

View File

@@ -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;