1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Use a loop to avoid recursion in the heightOfSelect() function.

FossilOrigin-Name: 86de43595cb2ecebd680fe654affcfb9fbcfff6575c893293ae298124a357bfe
This commit is contained in:
dan
2018-01-18 19:00:54 +00:00
parent 5a7da86f5b
commit 1a3a308616
3 changed files with 10 additions and 10 deletions

View File

@@ -658,15 +658,15 @@ static void heightOfExprList(ExprList *p, int *pnHeight){
}
}
}
static void heightOfSelect(Select *p, int *pnHeight){
if( p ){
static void heightOfSelect(Select *pSelect, int *pnHeight){
Select *p;
for(p=pSelect; p; p=p->pPrior){
heightOfExpr(p->pWhere, pnHeight);
heightOfExpr(p->pHaving, pnHeight);
heightOfExpr(p->pLimit, pnHeight);
heightOfExprList(p->pEList, pnHeight);
heightOfExprList(p->pGroupBy, pnHeight);
heightOfExprList(p->pOrderBy, pnHeight);
heightOfSelect(p->pPrior, pnHeight);
}
}