aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-12-26 00:20:56 +0000
committerdrh <drh@noemail.net>2019-12-26 00:20:56 +0000
commite86f3402ac8a1fc965a57749467bc87e199aa793 (patch)
tree8780573f589c88bb7638da790d6894b89b5baa22 /src/wherecode.c
parenta9ebfe20309d5aeec90337099a27e68454d16ff6 (diff)
downloadsqlite-e86f3402ac8a1fc965a57749467bc87e199aa793.tar.gz
sqlite-e86f3402ac8a1fc965a57749467bc87e199aa793.zip
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
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index d5d340374..a24dea82e 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -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