Do not use transitive WHERE-clause constraints on LEFT JOINs (#1034714)
This commit is contained in:
parent
f75c937c9d
commit
6ac28fc9c6
@ -0,0 +1,29 @@
|
|||||||
|
From c098d918e1e19088be9659c409f1a6fa32b0efe6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "D. Richard Hipp" <drh@hwaci.com>
|
||||||
|
Date: Mon, 28 Oct 2013 20:15:56 +0000
|
||||||
|
Subject: [PATCH] Do not use transitive WHERE-clause constraints on LEFT JOINs.
|
||||||
|
Fix for ticket [c620261b5b5dc].
|
||||||
|
|
||||||
|
---
|
||||||
|
src/where.c | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/where.c b/src/where.c
|
||||||
|
index 266dc92..4868a7a 100644
|
||||||
|
--- a/src/where.c
|
||||||
|
+++ b/src/where.c
|
||||||
|
@@ -878,7 +878,10 @@ static WhereTerm *whereScanNext(WhereScan *pScan){
|
||||||
|
iColumn = pScan->aEquiv[pScan->iEquiv-1];
|
||||||
|
while( (pWC = pScan->pWC)!=0 ){
|
||||||
|
for(pTerm=pWC->a+k; k<pWC->nTerm; k++, pTerm++){
|
||||||
|
- if( pTerm->leftCursor==iCur && pTerm->u.leftColumn==iColumn ){
|
||||||
|
+ if( pTerm->leftCursor==iCur
|
||||||
|
+ && pTerm->u.leftColumn==iColumn
|
||||||
|
+ && (pScan->iEquiv<=2 || !ExprHasProperty(pTerm->pExpr, EP_FromJoin))
|
||||||
|
+ ){
|
||||||
|
if( (pTerm->eOperator & WO_EQUIV)!=0
|
||||||
|
&& pScan->nEquiv<ArraySize(pScan->aEquiv)
|
||||||
|
){
|
||||||
|
--
|
||||||
|
1.8.4.2
|
||||||
|
|
@ -10,7 +10,7 @@
|
|||||||
Summary: Library that implements an embeddable SQL database engine
|
Summary: Library that implements an embeddable SQL database engine
|
||||||
Name: sqlite
|
Name: sqlite
|
||||||
Version: %{rpmver}
|
Version: %{rpmver}
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: Public Domain
|
License: Public Domain
|
||||||
Group: Applications/Databases
|
Group: Applications/Databases
|
||||||
URL: http://www.sqlite.org/
|
URL: http://www.sqlite.org/
|
||||||
@ -32,6 +32,8 @@ Patch4: sqlite-3.7.15-no-malloc-usable-size.patch
|
|||||||
Patch5: sqlite-3.7.16-man-missing-options.patch
|
Patch5: sqlite-3.7.16-man-missing-options.patch
|
||||||
# Temporary workaround for failed percentile test, see patch for details
|
# Temporary workaround for failed percentile test, see patch for details
|
||||||
Patch6: sqlite-3.8.0-percentile-test.patch
|
Patch6: sqlite-3.8.0-percentile-test.patch
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1034714
|
||||||
|
Patch7: 0001-Do-not-use-transitive-WHERE-clause-constraints-on-LE.patch
|
||||||
|
|
||||||
BuildRequires: ncurses-devel readline-devel glibc-devel
|
BuildRequires: ncurses-devel readline-devel glibc-devel
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -107,6 +109,7 @@ This package contains the tcl modules for %{name}.
|
|||||||
%patch4 -p1 -b .no-malloc-usable-size
|
%patch4 -p1 -b .no-malloc-usable-size
|
||||||
%patch5 -p1 -b .man-missing-options
|
%patch5 -p1 -b .man-missing-options
|
||||||
%patch6 -p1 -b .nonprecise-percentile-test
|
%patch6 -p1 -b .nonprecise-percentile-test
|
||||||
|
%patch7 -p1 -b .transitive-where-clause-constraints
|
||||||
|
|
||||||
# Remove cgi-script erroneously included in sqlite-doc-3070500
|
# Remove cgi-script erroneously included in sqlite-doc-3070500
|
||||||
rm -f %{name}-doc-%{realver}/search
|
rm -f %{name}-doc-%{realver}/search
|
||||||
@ -197,6 +200,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 26 2013 Debarshi Ray <rishi@fedoraproject.org> - 3.8.1-2
|
||||||
|
- Do not use transitive WHERE-clause constraints on LEFT JOINs (#1034714)
|
||||||
|
|
||||||
* Tue Oct 22 2013 Jan Stanek <jstanek@redhat.com> - 3.8.1-1
|
* Tue Oct 22 2013 Jan Stanek <jstanek@redhat.com> - 3.8.1-1
|
||||||
- Update to 3.8.1 (http://www.sqlite.org/releaselog/3_8_1.html)
|
- Update to 3.8.1 (http://www.sqlite.org/releaselog/3_8_1.html)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user