From 11039e7d6eac92b0e2ef5c874dcf691a52034a06 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Tue, 26 Nov 2013 16:59:34 +0000 Subject: [PATCH] update to 1.8.5 (#1034130) - add fix for wc-queries-test breakage (h/t Andreas Steiger, r1542774) Resolves: rhbz#985582 Resolves: rhbz#1034130 --- .gitignore | 1 + sources | 2 +- subversion-1.8.5-r1542774.patch | 74 +++++++++++++++++++++++++++++++++ subversion.spec | 10 ++++- 4 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 subversion-1.8.5-r1542774.patch diff --git a/.gitignore b/.gitignore index 54cec5b..8b3e536 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ subversion-1.6.12.tar.bz2 /subversion-1.8.1.tar.bz2 /subversion-1.8.3.tar.bz2 /subversion-1.8.4.tar.bz2 +/subversion-1.8.5.tar.bz2 diff --git a/sources b/sources index a450f78..fc6335c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a73a5caad3c442fe88e1f9c0e794d212 subversion-1.8.4.tar.bz2 +77349caf0ef5a612c9718c53516a9934 subversion-1.8.5.tar.bz2 diff --git a/subversion-1.8.5-r1542774.patch b/subversion-1.8.5-r1542774.patch new file mode 100644 index 0000000..55aeaff --- /dev/null +++ b/subversion-1.8.5-r1542774.patch @@ -0,0 +1,74 @@ + +http://svn.apache.org/viewvc?view=revision&revision=1542774 + +(H/T Andreas Stieger) + +--- subversion-1.8.5/subversion/tests/libsvn_wc/wc-queries-test.c.r1542774 ++++ subversion-1.8.5/subversion/tests/libsvn_wc/wc-queries-test.c +@@ -95,8 +95,8 @@ static const int slow_statements[] = + /* Operate on the entire WC */ + STMT_SELECT_ALL_NODES, /* schema validation code */ + +- /* Is there a record? ### Can we somehow check for LIMIT 1? */ +- STMT_LOOK_FOR_WORK, ++ /* Updates all records for a repository (designed slow) */ ++ STMT_UPDATE_LOCK_REPOS_ID, + + /* Full temporary table read */ + STMT_INSERT_ACTUAL_EMPTIES, +@@ -114,6 +114,19 @@ static const int slow_statements[] = + -1 /* final marker */ + }; + ++/* Statements that just read the first record from a table, ++ using the primary key. Specialized as different sqlite ++ versions produce different results */ ++static const int primary_key_statements[] = ++{ ++ /* Is there a record? ### Can we somehow check for LIMIT 1, ++ and primary key instead of adding a list? */ ++ STMT_LOOK_FOR_WORK, ++ STMT_SELECT_WORK_ITEM, ++ ++ -1 /* final marker */ ++}; ++ + /* Helper function to determine if a statement is in a list */ + static svn_boolean_t + in_list(const int list[], int stmt_idx) +@@ -529,6 +542,7 @@ is_node_table(const char *table_name) + return (apr_strnatcasecmp(table_name, "nodes") == 0 + || apr_strnatcasecmp(table_name, "actual_node") == 0 + || apr_strnatcasecmp(table_name, "externals") == 0 ++ || apr_strnatcasecmp(table_name, "lock") == 0 + || apr_strnatcasecmp(table_name, "wc_lock") == 0 + || FALSE); + } +@@ -651,14 +665,24 @@ test_query_expectations(apr_pool_t *scra + || (item->expression_vars < 1)) + && !is_result_table(item->table)) + { +- warned = TRUE; +- if (!is_slow_statement(i)) +- warnings = svn_error_createf(SVN_ERR_TEST_FAILED, warnings, ++ if (in_list(primary_key_statements, i)) ++ { ++ /* Reported as primary key index usage in Sqlite 3.7, ++ as table scan in 3.8+, while the execution plan is ++ identical: read first record from table */ ++ } ++ else if (!is_slow_statement(i)) ++ { ++ warned = TRUE; ++ warnings = svn_error_createf(SVN_ERR_TEST_FAILED, warnings, + "%s: " + "Uses %s with only %d index component: (%s)\n%s", + wc_query_info[i][0], item->table, + item->expression_vars, item->expressions, + wc_queries[i]); ++ } ++ else ++ warned = TRUE; + } + else if (item->search && !item->index) + { diff --git a/subversion.spec b/subversion.spec index a44df92..aab45bf 100644 --- a/subversion.spec +++ b/subversion.spec @@ -25,8 +25,8 @@ Summary: A Modern Concurrent Version Control System Name: subversion -Version: 1.8.4 -Release: 2%{?dist} +Version: 1.8.5 +Release: 1%{?dist} License: ASL 2.0 Group: Development/Tools URL: http://subversion.apache.org/ @@ -44,6 +44,7 @@ Patch3: subversion-1.8.0-kwallet.patch Patch4: subversion-1.8.0-rubybind.patch Patch5: subversion-1.8.0-aarch64.patch Patch6: subversion-1.8.4-r1543145.patch +Patch7: subversion-1.8.5-r1542774.patch BuildRequires: autoconf, libtool, python, python-devel, texinfo, which BuildRequires: %{dbdevel} >= 4.1.25, swig >= 1.3.24, gettext BuildRequires: apr-devel >= 1.3.0, apr-util-devel >= 1.3.0 @@ -183,6 +184,7 @@ This package includes supplementary tools for use with Subversion. %patch4 -p1 -b .rubybind %patch5 -p1 -b .aarch64 %patch6 -p1 -b .r1543145 +%patch7 -p1 -b .r1542774 %build # Regenerate the buildsystem, so that: @@ -476,6 +478,10 @@ rm -rf ${RPM_BUILD_ROOT} %endif %changelog +* Tue Nov 26 2013 Joe Orton - 1.8.5-1 +- update to 1.8.5 (#1034130) +- add fix for wc-queries-test breakage (h/t Andreas Steiger, r1542774) + * Mon Nov 18 2013 Joe Orton - 1.8.4-2 - add fix for ppc breakage (Andreas Stieger, #985582)