File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -515,7 +515,10 @@ static void transferJoinMarkings(Expr *pDerived, Expr *pBase){
515515static void markTermAsChild (WhereClause * pWC , int iChild , int iParent ){
516516 pWC -> a [iChild ].iParent = iParent ;
517517 pWC -> a [iChild ].truthProb = pWC -> a [iParent ].truthProb ;
518+ assert ( pWC -> a [iParent ].nChild < UMXV (pWC -> a [0 ].nChild ) );
518519 pWC -> a [iParent ].nChild ++ ;
520+ testcase ( pWC -> a [iParent ].nChild == UMXV (pWC -> a [0 ].nChild ) );
521+
519522}
520523
521524/*
@@ -1292,6 +1295,7 @@ static void exprAnalyze(
12921295 pList = pExpr -> x .pList ;
12931296 assert ( pList != 0 );
12941297 assert ( pList -> nExpr == 2 );
1298+ assert ( pWC -> a [idxTerm ].nChild == 0 );
12951299 for (i = 0 ; i < 2 ; i ++ ){
12961300 Expr * pNewExpr ;
12971301 int idxNew ;
@@ -1502,8 +1506,11 @@ static void exprAnalyze(
15021506 && pExpr -> x .pSelect -> pWin == 0
15031507#endif
15041508 && pWC -> op == TK_AND
1509+ && pExpr -> x .pSelect -> pEList -> nExpr <= UMXV (pTerm -> nChild )
1510+ /* ^-- See bug 2026-06-04T10:00:49Z */
15051511 ){
15061512 int i ;
1513+ assert ( pTerm -> nChild == 0 );
15071514 for (i = 0 ; i < sqlite3ExprVectorSize (pExpr -> pLeft ); i ++ ){
15081515 int idxNew ;
15091516 idxNew = whereClauseInsert (pWC , pExpr , TERM_VIRTUAL |TERM_SLICE );
You can’t perform that action at this time.
0 commit comments