From bf3117768715fc569c8310a83573a7d09b295751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= Date: Tue, 29 Apr 2014 11:09:31 +0200 Subject: [PATCH] Update to version 3.8.4.3 (http://www.sqlite.org/releaselog/3_8_4_3.html) - Changed patch for rhbz#1075889 to upstream version Related: #1075889 --- .gitignore | 2 ++ sources | 4 +-- sqlite-bug1075889.patch | 63 ++++++++++++++++++++++++----------------- sqlite.spec | 15 ++++++---- 4 files changed, 51 insertions(+), 33 deletions(-) diff --git a/.gitignore b/.gitignore index 8026ce3..3b5305d 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,5 @@ /sqlite-doc-3080400.zip /sqlite-src-3080402.zip /sqlite-doc-3080402.zip +/sqlite-src-3080403.zip +/sqlite-doc-3080403.zip diff --git a/sources b/sources index 5cc5dac..d43c1c2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -1ea0453f79a60214bf15cad78f7dbb10 sqlite-src-3080402.zip -a01373caab678ba5a5b12aa39a536ea0 sqlite-doc-3080402.zip +34cd453499e4b4564560accf24a9a70e sqlite-src-3080403.zip +22e623b68930d0e30ab82614a6ae832b sqlite-doc-3080403.zip diff --git a/sqlite-bug1075889.patch b/sqlite-bug1075889.patch index 8911f6c..398fec3 100644 --- a/sqlite-bug1075889.patch +++ b/sqlite-bug1075889.patch @@ -1,30 +1,41 @@ -Revert part of the upstream commit dca1945aeb3fb005, since it causes nautilus to crash +Upstream fix for the issue that caused 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; - } +--- src/where.c ++++ src/where.c +@@ -4855,18 +4855,10 @@ + ** rowid appears in the ORDER BY clause, the corresponding WhereLoop is + ** automatically order-distinct. + */ -+ /* 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; iinExpr; ii++){ -+ Expr *pExpr = sqlite3ExprSkipCollate(pOrderBy->a[ii].pExpr); -+ if( pExpr->op!=TK_COLUMN ){ -+ pWInfo->pOrderBy = pOrderBy = 0; -+ break; -+ }else if( pExpr->iColumn<0 ){ -+ break; -+ } + assert( pOrderBy!=0 ); +- +- /* Sortability of virtual tables is determined by the xBestIndex method +- ** of the virtual table itself */ +- if( pLast->wsFlags & WHERE_VIRTUALTABLE ){ +- testcase( nLoop>0 ); /* True when outer loops are one-row and match +- ** no ORDER BY terms */ +- return pLast->u.vtab.isOrdered; +- } + if( nLoop && OptimizationDisabled(db, SQLITE_OrderByIdxJoin) ) return 0; + + nOrderBy = pOrderBy->nExpr; + testcase( nOrderBy==BMS-1 ); + if( nOrderBy>BMS-1 ) return 0; /* Cannot optimize overly large ORDER BYs */ +@@ -4875,11 +4867,14 @@ + orderDistinctMask = 0; + ready = 0; + for(iLoop=0; isOrderDistinct && obSat0 ) ready |= pLoop->maskSelf; + pLoop = iLoopaLoop[iLoop] : pLast; +- assert( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 ); ++ if( pLoop->wsFlags & WHERE_VIRTUALTABLE ){ ++ if( pLoop->u.vtab.isOrdered ) obSat = obDone; ++ break; + } -+ } -+ - if( wctrlFlags & WHERE_WANT_DISTINCT ){ - if( isDistinctRedundant(pParse, pTabList, &pWInfo->sWC, pResultSet) ){ - /* The DISTINCT marking is pointless. Ignore it. */ + iCur = pWInfo->pTabList->a[pLoop->iTab].iCursor; + + /* Mark off any ORDER BY term X that is a column in the table of + ** the current loop for which there is term in the WHERE + ** clause of the form X IS NULL or X=? that reference only outer + diff --git a/sqlite.spec b/sqlite.spec index a8f326e..2b65afa 100644 --- a/sqlite.spec +++ b/sqlite.spec @@ -3,14 +3,14 @@ %bcond_with static %bcond_without check -%define realver 3080402 -%define docver 3080402 -%define rpmver 3.8.4.2 +%define realver 3080403 +%define docver 3080403 +%define rpmver 3.8.4.3 Summary: Library that implements an embeddable SQL database engine Name: sqlite Version: %{rpmver} -Release: 3%{?dist} +Release: 1%{?dist} License: Public Domain Group: Applications/Databases URL: http://www.sqlite.org/ @@ -114,7 +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 +%patch6 -b .bug1075889 # Remove cgi-script erroneously included in sqlite-doc-3070500 rm -f %{name}-doc-%{realver}/search @@ -206,6 +206,11 @@ make test %endif %changelog +* Tue Apr 29 2014 Jan Stanek - 3.8.4.3-1 +- Update to version 3.8.4.3 (http://www.sqlite.org/releaselog/3_8_4_3.html) +- Changed patch for rhbz#1075889 to upstream version + Related: #1075889 + * Fri Apr 25 2014 Honza Horak - 3.8.4.2-3 - Revert part of the upstream commit dca1945aeb3fb005, since it causes nautilus to crash