Always make sure the left-hand side of the IS NOT NULL operator is a
smiple column, not a general expression, before applying the IS NOT NULL query optimization. FossilOrigin-Name: 543f75a6abe3aa4f49df43e71a462702d40b3251
This commit is contained in:
+4
-1
@@ -1342,7 +1342,10 @@ static void exprAnalyze(
|
||||
** of the loop. Without the TERM_VNULL flag, the not-null check at
|
||||
** the start of the loop will prevent any results from being returned.
|
||||
*/
|
||||
if( pExpr->op==TK_NOTNULL && pExpr->pLeft->iColumn>=0 ){
|
||||
if( pExpr->op==TK_NOTNULL
|
||||
&& pExpr->pLeft->op==TK_COLUMN
|
||||
&& pExpr->pLeft->iColumn>=0
|
||||
){
|
||||
Expr *pNewExpr;
|
||||
Expr *pLeft = pExpr->pLeft;
|
||||
int idxNew;
|
||||
|
||||
Reference in New Issue
Block a user