1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Disables the optimization that tries to pull the value of an expression

from an index on that expression if the expression is a constant.

FossilOrigin-Name: e5fd8b50500f9225e435ef5afee98e3c2cccd22785f99c718d7e6c9b5b653c56
This commit is contained in:
drh
2019-12-26 00:20:56 +00:00
parent a9ebfe2030
commit e86f3402ac
3 changed files with 8 additions and 7 deletions

View File

@@ -1192,6 +1192,7 @@ static void whereIndexExprTrans(
if( iRef==XN_EXPR ){
assert( aColExpr->a[iIdxCol].pExpr!=0 );
x.pIdxExpr = aColExpr->a[iIdxCol].pExpr;
if( sqlite3ExprIsConstant(x.pIdxExpr) ) continue;
w.xExprCallback = whereIndexExprTransNode;
#ifndef SQLITE_OMIT_GENERATED_COLUMNS
}else if( iRef>=0