guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: subversion: Add fix for sqlite-3.8.9.


From: Mark H. Weaver
Subject: 01/02: gnu: subversion: Add fix for sqlite-3.8.9.
Date: Sat, 09 May 2015 00:33:27 +0000

mhw pushed a commit to branch master
in repository guix.

commit cbf71ea25ebf4291ce379003f8df9f2dbcc4f3b9
Author: Mark H Weaver <address@hidden>
Date:   Thu May 7 05:32:47 2015 -0400

    gnu: subversion: Add fix for sqlite-3.8.9.
    
    * gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch: New file.
    * gnu-system.am (dist_patch_DATA): Add it.
    * gnu/packages/version-control.scm (subversion): Add patch.
---
 gnu-system.am                                      |    1 +
 .../patches/subversion-sqlite-3.8.9-fix.patch      |   59 ++++++++++++++++++++
 gnu/packages/version-control.scm                   |    5 +-
 3 files changed, 64 insertions(+), 1 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index 95378a7..77c7836 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -544,6 +544,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/slim-config.patch                       \
   gnu/packages/patches/slim-sigusr1.patch                      \
   gnu/packages/patches/soprano-find-clucene.patch              \
+  gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch       \
   gnu/packages/patches/superlu-dist-scotchmetis.patch          \
   gnu/packages/patches/tcsh-fix-autotest.patch                 \
   gnu/packages/patches/teckit-cstdio.patch                     \
diff --git a/gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch 
b/gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch
new file mode 100644
index 0000000..92d8a85
--- /dev/null
+++ b/gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch
@@ -0,0 +1,59 @@
+This upstream patch (r1672295) is needed to fix a test failure when built
+against sqlite 3.8.9.  See:
+
+  
https://mail-archives.apache.org/mod_mbox/subversion-dev/201504.mbox/address@hidden
+
+
+r1672295 | rhuijben | 2015-04-09 07:31:12 -0400 (Thu, 09 Apr 2015) | 15 lines
+
+Optimize STMT_SELECT_EXTERNALS_DEFINED when using Sqlite 3.8.9, by
+adding two more rows to the sqlite_stat1 table.
+
+This fixes a test failure in wc-queries-test.c, but actual users most
+likely don't notice a difference as a tablescan on an EXTERNALS tables
+index is not that expensive, given that most working copies don't have
+many externals.
+
+* subversion/libsvn_wc/wc-metadata.sql
+  (STMT_INSTALL_SCHEMA_STATISTICS): Add two rows.
+
+* subversion/tests/libsvn_wc/wc-queries-test.c
+  (test_schema_statistics): Add a dummy externals row to allow
+    verifying schema.
+
+Index: subversion/tests/libsvn_wc/wc-queries-test.c
+===================================================================
+--- subversion/tests/libsvn_wc/wc-queries-test.c       (revision 1672294)
++++ subversion/tests/libsvn_wc/wc-queries-test.c       (revision 1672295)
+@@ -927,6 +927,15 @@
+                    "VALUES (1, '', '')",
+                    NULL, NULL, NULL));
+ 
++  SQLITE_ERR(
++      sqlite3_exec(sdb,
++                   "INSERT INTO EXTERNALS (wc_id, local_relpath,"
++                   "                       parent_relpath, repos_id,"
++                   "                       presence, kind, def_local_relpath,"
++                   "                       def_repos_relpath) "
++                   "VALUES (1, 'subdir', '', 1, 'normal', 'dir', '', '')",
++                   NULL, NULL, NULL));
++
+   /* These are currently not necessary for query optimization, but it's better
+      to tell Sqlite how we intend to use this table anyway */
+   SQLITE_ERR(
+Index: subversion/libsvn_wc/wc-metadata.sql
+===================================================================
+--- subversion/libsvn_wc/wc-metadata.sql       (revision 1672294)
++++ subversion/libsvn_wc/wc-metadata.sql       (revision 1672295)
+@@ -619,6 +619,11 @@
+ INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
+     ('WC_LOCK', 'sqlite_autoindex_WC_LOCK_1',           '100 100 1');
+ 
++INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
++    ('EXTERNALS','sqlite_autoindex_EXTERNALS_1',        '100 100 1');
++INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
++    ('EXTERNALS','I_EXTERNALS_DEFINED',                 '100 100 3 1');
++
+ /* sqlite_autoindex_WORK_QUEUE_1 doesn't exist because WORK_QUEUE is
+    a INTEGER PRIMARY KEY AUTOINCREMENT table */
+ 
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 96cab1e..0d153fa 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -547,7 +547,10 @@ property manipulation.")
                                  "subversion-" version ".tar.bz2"))
              (sha256
               (base32
-               "0ybmc0yq83jhblp42wdqvn2cryra3sypx8mkxn5b8lq7hilcr68h"))))
+               "0ybmc0yq83jhblp42wdqvn2cryra3sypx8mkxn5b8lq7hilcr68h"))
+             (patches
+              (list (search-patch "subversion-sqlite-3.8.9-fix.patch")))
+             (patch-flags '("-p0"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases (alist-cons-after



reply via email to

[Prev in Thread] Current Thread [Next in Thread]