In the count-of-view optimization, deferring freeing obsolete parts of the

parse tree, on the off-chance that some other part of the code might be
holding a pointer to those parts.

FossilOrigin-Name: da442578856c87137eb1677d9b13b7c1cf15828cc41d4756572b278060f69bae
This commit is contained in:
drh 2023-12-15 20:13:09 +00:00
parent 97f7ead3f3
commit 40e614e393
3 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Avoid\sexpiring\sprepared\sstatements\sin\sthe\smiddle\sof\san\sintegrity-check.
D 2023-12-15T19:26:16.801
C In\sthe\scount-of-view\soptimization,\sdeferring\sfreeing\sobsolete\sparts\sof\sthe\nparse\stree,\son\sthe\soff-chance\sthat\ssome\sother\spart\sof\sthe\scode\smight\sbe\nholding\sa\spointer\sto\sthose\sparts.
D 2023-12-15T20:13:09.193
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -736,7 +736,7 @@ F src/printf.c 18fbdf028345c8fbe6044f5f5bfda5a10d48d6287afef088cc21b0ca57985640
F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
F src/resolve.c da0a596a645cd7a8a9fd030e5126600b5639cc63f8ead18c1b67ff5a8a9b6a7f
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
F src/select.c f69e8e37c8bbe3bb02c890ad38a43c36757b87c7863d071d8ecd720732ed46cb
F src/select.c f1a81ff4f8e9e76c224e2ab3a4baa799add0db22158c7fcede65d8cc4a6fa2da
F src/shell.c.in 0df801a0445af3fc55c7330bcd8396ca5433154bb0f728edc8be2d6f27764361
F src/sqlite.h.in 61a60b4ea04db8ead15e1579b20b64cb56e9f55d52c5f9f9694de630110593a3
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
@ -2154,8 +2154,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 23b92d915c12ee768857e2c3c961832f390cad9b53b8bcfc2b97664baab25bb7
R c0f4a472eb421527038f0fdc417732a3
U dan
Z f9a0b0cd41d3223ca7993a52ea0189d1
P 88beb48472da4667c0727c8ebabe046ea526450ff837fe789d041ed3f1ff105e
R 9b65ab74c9a005ec2c0f339522792a80
U drh
Z 954ebb3c0337beba214faae55272d5ff
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
88beb48472da4667c0727c8ebabe046ea526450ff837fe789d041ed3f1ff105e
da442578856c87137eb1677d9b13b7c1cf15828cc41d4756572b278060f69bae

View File

@ -7135,7 +7135,7 @@ static int countOfViewOptimization(Parse *pParse, Select *p){
pSub->selFlags |= SF_Aggregate;
pSub->selFlags &= ~SF_Compound;
pSub->nSelectRow = 0;
sqlite3ExprListDelete(db, pSub->pEList);
sqlite3ParserAddCleanup(pParse, sqlite3ExprListDeleteGeneric, pSub->pEList);
pTerm = pPrior ? sqlite3ExprDup(db, pCount, 0) : pCount;
pSub->pEList = sqlite3ExprListAppend(pParse, 0, pTerm);
pTerm = sqlite3PExpr(pParse, TK_SELECT, 0, 0);