diff options
author | drh <> | 2021-05-14 15:37:00 +0000 |
---|---|---|
committer | drh <> | 2021-05-14 15:37:00 +0000 |
commit | 6a9595a76be89c570de9f63bee26ec2d9f108ab6 (patch) | |
tree | c77d28719dea7fcc1c3bbfc5aeef6f57581a05a1 /src | |
parent | b775c976822b1951506bf01c8cc6b223ba079627 (diff) | |
download | sqlite-6a9595a76be89c570de9f63bee26ec2d9f108ab6.tar.gz sqlite-6a9595a76be89c570de9f63bee26ec2d9f108ab6.zip |
Avoid adding superfluous virtual WHERE clause terms that might arise due
to the constant propagation optimization.
FossilOrigin-Name: cf63abbe559d04f993f99a37d41ba4a97c0261094f1d4cc05cfa23b1e11731f5
Diffstat (limited to 'src')
-rw-r--r-- | src/whereexpr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/whereexpr.c b/src/whereexpr.c index 2cbfa4e00..31f2ea438 100644 --- a/src/whereexpr.c +++ b/src/whereexpr.c @@ -996,6 +996,7 @@ static int exprMightBeIndexed( assert( op<=TK_GE ); if( pExpr->op==TK_VECTOR && (op>=TK_GT && ALWAYS(op<=TK_GE)) ){ pExpr = pExpr->x.pList->a[0].pExpr; + } if( pExpr->op==TK_COLUMN ){ @@ -1107,6 +1108,7 @@ static void exprAnalyze( if( op==TK_IS ) pTerm->wtFlags |= TERM_IS; if( pRight && exprMightBeIndexed(pSrc, pTerm->prereqRight, aiCurCol, pRight, op) + && !ExprHasProperty(pRight, EP_FixedCol) ){ WhereTerm *pNew; Expr *pDup; |