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

Remove unreachable code from this branch.

FossilOrigin-Name: 657c7b4f9df53e041a33cfad00ee2f507ac09c97a2ae61164bd189d660d167da
This commit is contained in:
dan
2024-03-13 18:41:05 +00:00
parent 35057fb4bc
commit aa2e244e14
3 changed files with 25 additions and 42 deletions

View File

@@ -1,5 +1,5 @@
C Fix\ssome\sOOM\shandling\sproblems\son\sthis\sbranch. C Remove\sunreachable\scode\sfrom\sthis\sbranch.
D 2024-03-13T17:33:45.566 D 2024-03-13T18:41:05.450
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -709,7 +709,7 @@ F src/hash.c 9ee4269fb1d6632a6fecfb9479c93a1f29271bddbbaf215dd60420bcb80c7220
F src/hash.h 3340ab6e1d13e725571d7cee6d3e3135f0779a7d8e76a9ce0a85971fa3953c51 F src/hash.h 3340ab6e1d13e725571d7cee6d3e3135f0779a7d8e76a9ce0a85971fa3953c51
F src/hwtime.h f9c2dfb84dce7acf95ce6d289e46f5f9d3d1afd328e53da8f8e9008e3b3caae6 F src/hwtime.h f9c2dfb84dce7acf95ce6d289e46f5f9d3d1afd328e53da8f8e9008e3b3caae6
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71 F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
F src/insert.c 7d4e27871c23ad98d062dcf21509573229b41307e125d4569a89e4a489383134 F src/insert.c 05dd5ea1b8da8a81e1132140fd4dd6d4d9e777ee282799c53cce4f3e9d7dd0ca
F src/json.c e2e40760d6689134c3e2ece38c6a496b34ff5e2661a8f238444a119af666fdce F src/json.c e2e40760d6689134c3e2ece38c6a496b34ff5e2661a8f238444a119af666fdce
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
F src/loadext.c 7432c944ff197046d67a1207790a1b13eec4548c85a9457eb0896bb3641dfb36 F src/loadext.c 7432c944ff197046d67a1207790a1b13eec4548c85a9457eb0896bb3641dfb36
@@ -2179,8 +2179,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 38635651f08d42110c01d6b24f6e362e340511846294f8696af4afc795dae80d P 2085c7f12a3916ec883c31795e29f2e2b6641c30ecf748cce9bff7b13b061d1f
R 3557bbe553b856781f68b1001ce502f1 R 77c42a89dcd308559626c377320e4df2
U dan U dan
Z cbe8c4c577b21b3ca1560ccfb96c64e5 Z 54b19091c4c166a485c83de0a7190e37
# Remove this line to create a well-formed Fossil manifest. # Remove this line to create a well-formed Fossil manifest.

View File

@@ -1 +1 @@
2085c7f12a3916ec883c31795e29f2e2b6641c30ecf748cce9bff7b13b061d1f 657c7b4f9df53e041a33cfad00ee2f507ac09c97a2ae61164bd189d660d167da

View File

@@ -604,29 +604,29 @@ static int multiValueIsConstantNoAff(ExprList *pRow){
} }
/*
** 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){ Select *sqlite3MultiValues(Parse *pParse, Select *pLeft, ExprList *pRow){
SrcItem *p;
SelectDest dest;
Select *pSelect = 0;
if( pParse->db->init.busy if( pLeft->pPrior
|| pParse->pNewTrigger
|| pParse->bHasWith || pParse->bHasWith
|| pParse->db->init.busy
|| multiValueIsConstant(pRow)==0 || multiValueIsConstant(pRow)==0
|| pLeft->pPrior
|| (pLeft->pSrc->nSrc==0 && multiValueIsConstantNoAff(pLeft->pEList)==0) || (pLeft->pSrc->nSrc==0 && multiValueIsConstantNoAff(pLeft->pEList)==0)
){ ){
/* This row of the VALUES clause cannot be coded immediately. */ /* This row of the VALUES clause cannot be coded immediately. */
Select *pSelect = 0;
int f = SF_Values | SF_MultiValue; int f = SF_Values | SF_MultiValue;
if( pLeft->pSrc->nSrc ){ if( pLeft->pSrc->nSrc ){
sqlite3MultiValuesEnd(pParse, pLeft); sqlite3MultiValuesEnd(pParse, pLeft);
f = SF_Values; f = SF_Values;
}else if( pLeft->pPrior ){ }else if( pLeft->pPrior ){
/* In this case set the SF_MultiValue flag only if it was set on /* In this case set the SF_MultiValue flag only if it was set on pLeft */
** the previous Select structure. */
f = (f & pLeft->selFlags); 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; pLeft->selFlags &= ~SF_MultiValue;
if( pSelect ){ if( pSelect ){
pSelect->op = TK_ALL; pSelect->op = TK_ALL;
@@ -634,6 +634,7 @@ Select *sqlite3MultiValues(Parse *pParse, Select *pLeft, ExprList *pRow){
pLeft = pSelect; pLeft = pSelect;
} }
}else{ }else{
SrcItem *p = 0;
if( pLeft->pSrc->nSrc==0 ){ if( pLeft->pSrc->nSrc==0 ){
/* Co-routine has not yet been started. */ /* Co-routine has not yet been started. */
@@ -642,15 +643,14 @@ Select *sqlite3MultiValues(Parse *pParse, Select *pLeft, ExprList *pRow){
pRet = sqlite3SelectNew(pParse, 0, 0, 0, 0, 0, 0, 0, 0); pRet = sqlite3SelectNew(pParse, 0, 0, 0, 0, 0, 0, 0, 0);
if( pRet ){ if( pRet ){
p = &pRet->pSrc->a[0]; SelectDest dest;
pRet->pSrc->nSrc = 1; pRet->pSrc->nSrc = 1;
p = &pRet->pSrc->a[0];
p->pSelect = pLeft; p->pSelect = pLeft;
p->fg.viaCoroutine = 1; p->fg.viaCoroutine = 1;
p->addrFillSub = sqlite3VdbeCurrentAddr(v) + 1; p->addrFillSub = sqlite3VdbeCurrentAddr(v) + 1;
p->regReturn = ++pParse->nMem; p->regReturn = ++pParse->nMem;
p->iCursor = -1; p->iCursor = -1;
sqlite3VdbeAddOp3(v,OP_InitCoroutine,p->regReturn,0,p->addrFillSub); sqlite3VdbeAddOp3(v,OP_InitCoroutine,p->regReturn,0,p->addrFillSub);
sqlite3SelectDestInit(&dest, SRT_Coroutine, p->regReturn); sqlite3SelectDestInit(&dest, SRT_Coroutine, p->regReturn);
sqlite3Select(pParse, pLeft, &dest); sqlite3Select(pParse, pLeft, &dest);
@@ -663,32 +663,15 @@ Select *sqlite3MultiValues(Parse *pParse, Select *pLeft, ExprList *pRow){
} }
if( pParse->nErr==0 ){ if( pParse->nErr==0 ){
pSelect = sqlite3SelectNew(pParse, pRow, 0, 0, 0, 0, 0, SF_Values, 0); if( p->pSelect->pEList->nExpr!=pRow->nExpr ){
if( pSelect ){ sqlite3SelectWrongNumTermsError(pParse, p->pSelect);
if( p->pSelect->pEList->nExpr!=pSelect->pEList->nExpr ){
sqlite3SelectWrongNumTermsError(pParse, pSelect);
}else{ }else{
sqlite3SelectPrep(pParse, pSelect, 0); sqlite3ExprCodeExprList(pParse, pRow, p->regResult, 0, 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); sqlite3VdbeAddOp1(pParse->pVdbe, OP_Yield, p->regReturn);
} }
} }
sqlite3SelectDelete(pParse->db, pSelect);
}
}else{
sqlite3ExprListDelete(pParse->db, pRow); sqlite3ExprListDelete(pParse->db, pRow);
} }
}
return pLeft; return pLeft;
} }