diff options
Diffstat (limited to 'gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch')
| -rw-r--r-- | gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch | 59 |
1 files changed, 59 insertions, 0 deletions
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 00000000000..92d8a85c8f6 --- /dev/null +++ b/gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | This upstream patch (r1672295) is needed to fix a test failure when built | ||
| 2 | against sqlite 3.8.9. See: | ||
| 3 | |||
| 4 | https://mail-archives.apache.org/mod_mbox/subversion-dev/201504.mbox/%3C5526D197.6020808@gmx.de%3E | ||
| 5 | |||
| 6 | |||
| 7 | r1672295 | rhuijben | 2015-04-09 07:31:12 -0400 (Thu, 09 Apr 2015) | 15 lines | ||
| 8 | |||
| 9 | Optimize STMT_SELECT_EXTERNALS_DEFINED when using Sqlite 3.8.9, by | ||
| 10 | adding two more rows to the sqlite_stat1 table. | ||
| 11 | |||
| 12 | This fixes a test failure in wc-queries-test.c, but actual users most | ||
| 13 | likely don't notice a difference as a tablescan on an EXTERNALS tables | ||
| 14 | index is not that expensive, given that most working copies don't have | ||
| 15 | many externals. | ||
| 16 | |||
| 17 | * subversion/libsvn_wc/wc-metadata.sql | ||
| 18 | (STMT_INSTALL_SCHEMA_STATISTICS): Add two rows. | ||
| 19 | |||
| 20 | * subversion/tests/libsvn_wc/wc-queries-test.c | ||
| 21 | (test_schema_statistics): Add a dummy externals row to allow | ||
| 22 | verifying schema. | ||
| 23 | |||
| 24 | Index: subversion/tests/libsvn_wc/wc-queries-test.c | ||
| 25 | =================================================================== | ||
| 26 | --- subversion/tests/libsvn_wc/wc-queries-test.c (revision 1672294) | ||
| 27 | +++ subversion/tests/libsvn_wc/wc-queries-test.c (revision 1672295) | ||
| 28 | @@ -927,6 +927,15 @@ | ||
| 29 | "VALUES (1, '', '')", | ||
| 30 | NULL, NULL, NULL)); | ||
| 31 | |||
| 32 | + SQLITE_ERR( | ||
| 33 | + sqlite3_exec(sdb, | ||
| 34 | + "INSERT INTO EXTERNALS (wc_id, local_relpath," | ||
| 35 | + " parent_relpath, repos_id," | ||
| 36 | + " presence, kind, def_local_relpath," | ||
| 37 | + " def_repos_relpath) " | ||
| 38 | + "VALUES (1, 'subdir', '', 1, 'normal', 'dir', '', '')", | ||
| 39 | + NULL, NULL, NULL)); | ||
| 40 | + | ||
| 41 | /* These are currently not necessary for query optimization, but it's better | ||
| 42 | to tell Sqlite how we intend to use this table anyway */ | ||
| 43 | SQLITE_ERR( | ||
| 44 | Index: subversion/libsvn_wc/wc-metadata.sql | ||
| 45 | =================================================================== | ||
| 46 | --- subversion/libsvn_wc/wc-metadata.sql (revision 1672294) | ||
| 47 | +++ subversion/libsvn_wc/wc-metadata.sql (revision 1672295) | ||
| 48 | @@ -619,6 +619,11 @@ | ||
| 49 | INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES | ||
| 50 | ('WC_LOCK', 'sqlite_autoindex_WC_LOCK_1', '100 100 1'); | ||
| 51 | |||
| 52 | +INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES | ||
| 53 | + ('EXTERNALS','sqlite_autoindex_EXTERNALS_1', '100 100 1'); | ||
| 54 | +INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES | ||
| 55 | + ('EXTERNALS','I_EXTERNALS_DEFINED', '100 100 3 1'); | ||
| 56 | + | ||
| 57 | /* sqlite_autoindex_WORK_QUEUE_1 doesn't exist because WORK_QUEUE is | ||
| 58 | a INTEGER PRIMARY KEY AUTOINCREMENT table */ | ||
| 59 | |||
