-C Fix\ssome\sOOM\shandling\sproblems\son\sthis\sbranch.
-D 2024-03-13T17:33:45.566
+C Remove\sunreachable\scode\sfrom\sthis\sbranch.
+D 2024-03-13T18:41:05.450
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
F src/hash.h 3340ab6e1d13e725571d7cee6d3e3135f0779a7d8e76a9ce0a85971fa3953c51
F src/hwtime.h f9c2dfb84dce7acf95ce6d289e46f5f9d3d1afd328e53da8f8e9008e3b3caae6
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
-F src/insert.c 7d4e27871c23ad98d062dcf21509573229b41307e125d4569a89e4a489383134
+F src/insert.c 05dd5ea1b8da8a81e1132140fd4dd6d4d9e777ee282799c53cce4f3e9d7dd0ca
F src/json.c e2e40760d6689134c3e2ece38c6a496b34ff5e2661a8f238444a119af666fdce
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
F src/loadext.c 7432c944ff197046d67a1207790a1b13eec4548c85a9457eb0896bb3641dfb36
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 38635651f08d42110c01d6b24f6e362e340511846294f8696af4afc795dae80d
-R 3557bbe553b856781f68b1001ce502f1
+P 2085c7f12a3916ec883c31795e29f2e2b6641c30ecf748cce9bff7b13b061d1f
+R 77c42a89dcd308559626c377320e4df2
U dan
-Z cbe8c4c577b21b3ca1560ccfb96c64e5
+Z 54b19091c4c166a485c83de0a7190e37
# Remove this line to create a well-formed Fossil manifest.
}
+/*
+** This function is called by the parser for the second and subsequent
+** rows of a multi-row VALUES clause.
+*/
Select *sqlite3MultiValues(Parse *pParse, Select *pLeft, ExprList *pRow){
- SrcItem *p;
- SelectDest dest;
- Select *pSelect = 0;
- if( pParse->db->init.busy
- || pParse->pNewTrigger
+ if( pLeft->pPrior
|| pParse->bHasWith
+ || pParse->db->init.busy
|| multiValueIsConstant(pRow)==0
- || pLeft->pPrior
|| (pLeft->pSrc->nSrc==0 && multiValueIsConstantNoAff(pLeft->pEList)==0)
){
/* This row of the VALUES clause cannot be coded immediately. */
+ Select *pSelect = 0;
int f = SF_Values | SF_MultiValue;
if( pLeft->pSrc->nSrc ){
sqlite3MultiValuesEnd(pParse, pLeft);
f = SF_Values;
}else if( pLeft->pPrior ){
- /* In this case set the SF_MultiValue flag only if it was set on
- ** the previous Select structure. */
+ /* In this case set the SF_MultiValue flag only if it was set on pLeft */
f = (f & pLeft->selFlags);
}
- pSelect = sqlite3SelectNew(pParse,pRow,0,0,0,0,0,f,0);
+ pSelect = sqlite3SelectNew(pParse, pRow, 0, 0, 0, 0, 0, f, 0);
pLeft->selFlags &= ~SF_MultiValue;
if( pSelect ){
pSelect->op = TK_ALL;
pLeft = pSelect;
}
}else{
+ SrcItem *p = 0;
if( pLeft->pSrc->nSrc==0 ){
/* Co-routine has not yet been started. */
pRet = sqlite3SelectNew(pParse, 0, 0, 0, 0, 0, 0, 0, 0);
if( pRet ){
- p = &pRet->pSrc->a[0];
+ SelectDest dest;
pRet->pSrc->nSrc = 1;
-
+ p = &pRet->pSrc->a[0];
p->pSelect = pLeft;
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);
sqlite3Select(pParse, pLeft, &dest);
}
if( pParse->nErr==0 ){
- pSelect = sqlite3SelectNew(pParse, pRow, 0, 0, 0, 0, 0, SF_Values, 0);
- if( pSelect ){
- if( p->pSelect->pEList->nExpr!=pSelect->pEList->nExpr ){
- sqlite3SelectWrongNumTermsError(pParse, pSelect);
- }else{
- sqlite3SelectPrep(pParse, pSelect, 0);
-#ifndef SQLITE_OMIT_WINDOWFUNC
- if( pSelect->pWin ){
- sqlite3SelectDestInit(&dest, SRT_Coroutine, p->regReturn);
- dest.iSdst = p->regResult;
- dest.nSdst = pRow->nExpr;
- dest.iSDParm = p->regReturn;
- sqlite3Select(pParse, pSelect, &dest);
- }else
-#endif
- {
- sqlite3ExprCodeExprList(pParse, pSelect->pEList,p->regResult,0,0);
- sqlite3VdbeAddOp1(pParse->pVdbe, OP_Yield, p->regReturn);
- }
- }
- sqlite3SelectDelete(pParse->db, pSelect);
+ if( p->pSelect->pEList->nExpr!=pRow->nExpr ){
+ sqlite3SelectWrongNumTermsError(pParse, p->pSelect);
+ }else{
+ sqlite3ExprCodeExprList(pParse, pRow, p->regResult, 0, 0);
+ sqlite3VdbeAddOp1(pParse->pVdbe, OP_Yield, p->regReturn);
}
- }else{
- sqlite3ExprListDelete(pParse->db, pRow);
}
+ sqlite3ExprListDelete(pParse->db, pRow);
}
return pLeft;