1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Refactor the SrcItem object so that information about subqueries is stored

in a separately allocated Subquery object.  This reduces the memory requirements
for SrcItem and makes the code run faster.  It also provides an expansion path
for subquery processing that does not burden simple queries.  The current
checking mostly works, but there are still issues that need to be tracked
down and fixed.

FossilOrigin-Name: 8ff5dda8448d7e1a533d7f27db2573ce68fa9956b9d9847ced45e83c1f06bab0
This commit is contained in:
drh
2024-08-19 22:48:30 +00:00
parent b204b6aa7b
commit 1521ca4c20
18 changed files with 419 additions and 204 deletions

View File

@@ -171,7 +171,9 @@ int sqlite3WalkSelectFrom(Walker *pWalker, Select *p){
pSrc = p->pSrc;
if( ALWAYS(pSrc) ){
for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){
if( pItem->sq.pSelect && sqlite3WalkSelect(pWalker, pItem->sq.pSelect) ){
if( pItem->fg.isSubquery
&& sqlite3WalkSelect(pWalker, pItem->u4.pSubq->pSelect)
){
return WRC_Abort;
}
if( pItem->fg.isTabFunc