You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2014/02/11 11:36:08 UTC

svn commit: r1567034 - /subversion/trunk/subversion/libsvn_subr/sqlite.c

Author: rhuijben
Date: Tue Feb 11 10:36:07 2014
New Revision: 1567034

URL: http://svn.apache.org/r1567034
Log:
* subversion/libsvn_subr/sqlite.c
  (svn_sqlite__open): Unblock STAT3/STAT4 when using the Sqlite 3.8.3.1
    release that should be out later this week, using a snippet from
    http://www.sqlite.org/src/info/4c86b126f2

Modified:
    subversion/trunk/subversion/libsvn_subr/sqlite.c

Modified: subversion/trunk/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sqlite.c?rev=1567034&r1=1567033&r2=1567034&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sqlite.c Tue Feb 11 10:36:07 2014
@@ -1078,16 +1078,21 @@ svn_sqlite__open(svn_sqlite__db_t **db, 
 
   /* runtime check for https://www.sqlite.org/src/info/4c86b126f2 */
 #if SQLITE_VERSION_NUMBER > 3008000 && SQLITE_VERSION_NUMBER < 3008004
-  if (sqlite3_compileoption_used("ENABLE_STAT3"))
-    return svn_error_createf(SVN_ERR_UNSUPPORTED_DEPENDENCY, NULL,
-                             _("'%s' compile time SQLite option is broken "
-                               "with SQLite 3.8.1 - 3.8.3"),
-                             "SQLITE_ENABLE_STAT3");
-  if (sqlite3_compileoption_used("ENABLE_STAT4"))
-    return svn_error_createf(SVN_ERR_UNSUPPORTED_DEPENDENCY, NULL,
-                             _("'%s' compile time SQLite option is broken "
-                               "with SQLite 3.8.1 - 3.8.3"),
-                             "SQLITE_ENABLE_STAT4");
+  /* Allow Sqlite 3.8.3.1 as workaround by checking the date, following
+     example code from the Sqlite developers on the Sqlite issue url */
+  if (strcmp(SQLITE_SOURCE_ID, "2014-02-11") < 0) 
+    {
+      if (sqlite3_compileoption_used("ENABLE_STAT3"))
+        return svn_error_createf(SVN_ERR_UNSUPPORTED_DEPENDENCY, NULL,
+                                 _("'%s' compile time SQLite option is broken "
+                                   "with SQLite 3.8.1 - 3.8.3"),
+                                 "SQLITE_ENABLE_STAT3");
+      if (sqlite3_compileoption_used("ENABLE_STAT4"))
+        return svn_error_createf(SVN_ERR_UNSUPPORTED_DEPENDENCY, NULL,
+                                 _("'%s' compile time SQLite option is broken "
+                                   "with SQLite 3.8.1 - 3.8.3"),
+                                 "SQLITE_ENABLE_STAT4");
+    }
 #endif
 
   *db = apr_pcalloc(result_pool, sizeof(**db));



Re: svn commit: r1567034 - /subversion/trunk/subversion/libsvn_subr/sqlite.c

Posted by Branko Čibej <br...@wandisco.com>.
On 11.02.2014 11:36, rhuijben@apache.org wrote:
> Author: rhuijben
> Date: Tue Feb 11 10:36:07 2014
> New Revision: 1567034
>
> URL: http://svn.apache.org/r1567034
> Log:
> * subversion/libsvn_subr/sqlite.c
>   (svn_sqlite__open): Unblock STAT3/STAT4 when using the Sqlite 3.8.3.1
>     release that should be out later this week, using a snippet from
>     http://www.sqlite.org/src/info/4c86b126f2

I have to disagree with this change. It's one thing to forbid the use of
known broken released versions. It's quite another to assume that the
unreleased bug fix (and hence SQLite source ID) is final before it's
actually released.

Let's just wait for 3.8.3.1 and adjust our checks accordingly. We can
wait with the backport and the 1.8.7 release until then, too.

-- Brane


-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com