mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-10 01:02:56 +03:00
Faster computation of Expr.nHeight.
FossilOrigin-Name: a7a5af327ba8bafcd58b828e3e7a10d0008bb780d55a6c573aa15896dcc8ab89
This commit is contained in:
@@ -769,9 +769,8 @@ static void heightOfSelect(const Select *pSelect, int *pnHeight){
|
||||
** if appropriate.
|
||||
*/
|
||||
static void exprSetHeight(Expr *p){
|
||||
int nHeight = 0;
|
||||
heightOfExpr(p->pLeft, &nHeight);
|
||||
heightOfExpr(p->pRight, &nHeight);
|
||||
int nHeight = p->pLeft ? p->pLeft->nHeight : 0;
|
||||
if( p->pRight && p->pRight->nHeight>nHeight ) nHeight = p->pRight->nHeight;
|
||||
if( ExprUseXSelect(p) ){
|
||||
heightOfSelect(p->x.pSelect, &nHeight);
|
||||
}else if( p->x.pList ){
|
||||
|
Reference in New Issue
Block a user