aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2018-07-27 16:57:11 +0000
committerdrh <drh@noemail.net>2018-07-27 16:57:11 +0000
commitefad2e23668ea5cbd744b6abde43058de45fb53a (patch)
treea9b47f95d1da7ca005ed0e772d21fcc72b0efc32 /src/wherecode.c
parent7de7602eb7deac00e4bb5c2f44f82f5389cbcb83 (diff)
downloadsqlite-efad2e23668ea5cbd744b6abde43058de45fb53a.tar.gz
sqlite-efad2e23668ea5cbd744b6abde43058de45fb53a.zip
Constant propagation is now restricted to just the WHERE clause. The
mechanism is changed to take affinity and collation into account. This seems to give correct answers. But the search for constant propagation costs 4 million cycles in the speed test. FossilOrigin-Name: 82c67efb723dba387964f690cd459b420e59e3367d9589016597a76531596391
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index 3bb220d2e..1f24c578b 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -883,7 +883,7 @@ static int codeCursorHintIsOrFunction(Walker *pWalker, Expr *pExpr){
static int codeCursorHintFixExpr(Walker *pWalker, Expr *pExpr){
int rc = WRC_Continue;
struct CCurHint *pHint = pWalker->u.pCCurHint;
- if( pExpr->op==TK_COLUMN ){
+ if( pExpr->op==TK_COLUMN && !ExprHasProperty(pExpr, EP_FixedCol) ){
if( pExpr->iTable!=pHint->iTabCur ){
Vdbe *v = pWalker->pParse->pVdbe;
int reg = ++pWalker->pParse->nMem; /* Register for column value */