Blame SOURCES/sqlite-3.26.0-CVE-2020-6405.patch

ec7966
From 1668926bc3c7da0b2870a60382b179a0e3edb5de Mon Sep 17 00:00:00 2001
ec7966
From: Ondrej Dubaj <odubaj@redhat.com>
ec7966
Date: Thu, 26 Mar 2020 08:14:29 +0100
ec7966
Subject: [PATCH] Do not allow the constant-propagation optimization to apple
ec7966
 to ON/USING clause terms as it does not help and it might cause downstream
ec7966
 problems.
ec7966
ec7966
---
ec7966
 src/select.c | 2 +-
ec7966
 1 file changed, 1 insertion(+), 1 deletion(-)
ec7966
ec7966
diff --git a/src/select.c b/src/select.c
ec7966
index bbd13a4..88a43df 100644
ec7966
--- a/src/select.c
ec7966
+++ b/src/select.c
ec7966
@@ -4171,7 +4171,7 @@ static int propagateConstantExprRewrite(Walker *pWalker, Expr *pExpr){
ec7966
   int i;
ec7966
   WhereConst *pConst;
ec7966
   if( pExpr->op!=TK_COLUMN ) return WRC_Continue;
ec7966
-  if( ExprHasProperty(pExpr, EP_FixedCol) ) return WRC_Continue;
ec7966
+  if( ExprHasProperty(pExpr, EP_FixedCol|EP_FromJoin) ) return WRC_Continue;
ec7966
   pConst = pWalker->u.pConst;
ec7966
   for(i=0; i<pConst->nConst; i++){
ec7966
     Expr *pColumn = pConst->apExpr[i*2];
ec7966
-- 
ec7966
2.24.1
ec7966