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

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