summaryrefslogtreecommitdiff
path: root/extra/sqlite
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-05-06 03:44:20 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-05-06 03:44:20 +0000
commit58ee2a8b8164437294a44a627d05ee1c701ced57 (patch)
tree8b37bc17534883a0f5e7edb57b2a9301d4b41d92 /extra/sqlite
parentd7918d0226da2805ff09c48963d2c79e1327c630 (diff)
Tue May 6 03:39:24 UTC 2014
Diffstat (limited to 'extra/sqlite')
-rw-r--r--extra/sqlite/PKGBUILD16
-rw-r--r--extra/sqlite/sqlite-nautilus.patch41
2 files changed, 53 insertions, 4 deletions
diff --git a/extra/sqlite/PKGBUILD b/extra/sqlite/PKGBUILD
index d27620468..2a31a43f2 100644
--- a/extra/sqlite/PKGBUILD
+++ b/extra/sqlite/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 209788 2014-04-04 08:57:39Z andyrtr $
+# $Id: PKGBUILD 212049 2014-05-05 12:26:57Z andyrtr $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
@@ -8,7 +8,7 @@ _amalgamationver=3080403
_docver=${_amalgamationver}
#_docver=3080001
pkgver=3.8.4.3
-pkgrel=1
+pkgrel=2
pkgdesc="A C library that implements an SQL database engine"
arch=('i686' 'x86_64')
license=('custom:Public Domain')
@@ -17,11 +17,19 @@ makedepends=('tcl' 'readline')
source=( # tarball containing the amalgamation for SQLite >= 3.7.5 together with a configure script and makefile for building it; includes now also the Tcl Extension Architecture (TEA)
http://www.sqlite.org/2014/sqlite-autoconf-$_amalgamationver.tar.gz
http://www.sqlite.org/2014/sqlite-doc-${_docver}.zip
- license.txt)
+ license.txt
+ sqlite-nautilus.patch)
options=('!emptydirs')
sha1sums=('70f3b100fa22e5bfebfe1b0a2102612e3c6c53fb'
'ce8615799a9da7fc9d2cbcd2774d77da4ba72417'
- 'f34f6daa4ab3073d74e774aad21d66878cf26853')
+ 'f34f6daa4ab3073d74e774aad21d66878cf26853'
+ '4e9a4f80c91bbaf80f0f45b9b97fb1cbe3464bc7')
+
+prepare() {
+ cd "$srcdir"/sqlite-autoconf-$_amalgamationver
+ # https://bugs.archlinux.org/task/39861
+ patch -Np1 -i ${srcdir}/sqlite-nautilus.patch
+}
build() {
export CFLAGS="$CFLAGS -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE"
diff --git a/extra/sqlite/sqlite-nautilus.patch b/extra/sqlite/sqlite-nautilus.patch
new file mode 100644
index 000000000..046b1acfa
--- /dev/null
+++ b/extra/sqlite/sqlite-nautilus.patch
@@ -0,0 +1,41 @@
+Upstream fix for the issue that caused nautilus to crash.
+RHBZ: #1075889
+
+--- src/sqlite3.c
++++ src/sqlite3.c
+@@ -4855,18 +4855,10 @@
+ ** rowid appears in the ORDER BY clause, the corresponding WhereLoop is
+ ** automatically order-distinct.
+ */
+
+ 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 && obSat<obDone && iLoop<=nLoop; iLoop++){
+ if( iLoop>0 ) ready |= pLoop->maskSelf;
+ pLoop = iLoop<nLoop ? pPath->aLoop[iLoop] : pLast;
+- assert( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 );
++ if( pLoop->wsFlags & WHERE_VIRTUALTABLE ){
++ if( pLoop->u.vtab.isOrdered ) obSat = obDone;
++ break;
++ }
+ 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
+