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

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