Revert part of the upstream commit dca1945aeb3fb005, since it causes nautilus to crash Related: #1075889

This commit is contained in:
Honza Horak 2014-04-25 10:56:58 +02:00 committed by Vít Ondruch
parent 2c2eb9ed52
commit 388d96395c
2 changed files with 38 additions and 1 deletions

30
sqlite-bug1075889.patch Normal file
View File

@ -0,0 +1,30 @@
Revert part of the upstream commit dca1945aeb3fb005, since it causes nautilus to crash
RHBZ: #1075889
Reported to sqlite-users@sqlite.org on 14/04/25
diff -up sqlite-src-3080402/src/where.c.bug1075889 sqlite-src-3080402/src/where.c
--- sqlite-src-3080402/src/where.c.bug1075889 2014-04-25 10:16:15.977722490 +0200
+++ sqlite-src-3080402/src/where.c 2014-04-25 10:18:12.600728656 +0200
@@ -5532,6 +5529,22 @@ WhereInfo *sqlite3WhereBegin(
goto whereBeginError;
}
+ /* If the ORDER BY (or GROUP BY) clause contains references to general
+ ** expressions, then we won't be able to satisfy it using indices, so
+ ** go ahead and disable it now.
+ */
+ if( pOrderBy && (wctrlFlags & WHERE_WANT_DISTINCT)!=0 ){
+ for(ii=0; ii<pOrderBy->nExpr; ii++){
+ Expr *pExpr = sqlite3ExprSkipCollate(pOrderBy->a[ii].pExpr);
+ if( pExpr->op!=TK_COLUMN ){
+ pWInfo->pOrderBy = pOrderBy = 0;
+ break;
+ }else if( pExpr->iColumn<0 ){
+ break;
+ }
+ }
+ }
+
if( wctrlFlags & WHERE_WANT_DISTINCT ){
if( isDistinctRedundant(pParse, pTabList, &pWInfo->sWC, pResultSet) ){
/* The DISTINCT marking is pointless. Ignore it. */

View File

@ -10,7 +10,7 @@
Summary: Library that implements an embeddable SQL database engine
Name: sqlite
Version: %{rpmver}
Release: 2%{?dist}
Release: 3%{?dist}
License: Public Domain
Group: Applications/Databases
URL: http://www.sqlite.org/
@ -31,6 +31,7 @@ Patch3: sqlite-3.7.10-pagecache-overflow-test.patch
Patch4: sqlite-3.7.15-no-malloc-usable-size.patch
# Temporary workaround for failed percentile test, see patch for details
Patch5: sqlite-3.8.0-percentile-test.patch
Patch6: sqlite-bug1075889.patch
BuildRequires: ncurses-devel readline-devel glibc-devel
BuildRequires: autoconf
@ -113,6 +114,7 @@ This package contains the analysis program for %{name}.
%patch3 -p1 -b .pagecache-overflow-test
%patch4 -p1 -b .no-malloc-usable-size
%patch5 -p1 -b .nonprecise-percentile-test
%patch6 -p1 -b .bug1075889
# Remove cgi-script erroneously included in sqlite-doc-3070500
rm -f %{name}-doc-%{realver}/search
@ -204,6 +206,11 @@ make test
%endif
%changelog
* Fri Apr 25 2014 Honza Horak <hhorak@redhat.com> - 3.8.4.2-3
- Revert part of the upstream commit dca1945aeb3fb005, since it causes
nautilus to crash
Related: #1075889
* Wed Apr 02 2014 Jan Stanek <jstanek@redhat.com> 3.8.4.2-2
- Added building and shipping of sqlite3_analyzer (#1007159)