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

svn commit: r1567282 - in /subversion/trunk: build/ac-macros/sqlite.m4 subversion/include/svn_error_codes.h subversion/libsvn_subr/sqlite.c

Author: breser
Date: Tue Feb 11 18:41:37 2014
New Revision: 1567282

URL: http://svn.apache.org/r1567282
Log:
Revert r1566960, r1566977, r1566978, and r1567034.

We have a way to disable the problematic features at runtime.  So we'll do
that instead.

Modified:
    subversion/trunk/build/ac-macros/sqlite.m4
    subversion/trunk/subversion/include/svn_error_codes.h
    subversion/trunk/subversion/libsvn_subr/sqlite.c

Modified: subversion/trunk/build/ac-macros/sqlite.m4
URL: http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/sqlite.m4?rev=1567282&r1=1567281&r2=1567282&view=diff
==============================================================================
--- subversion/trunk/build/ac-macros/sqlite.m4 (original)
+++ subversion/trunk/build/ac-macros/sqlite.m4 Tue Feb 11 18:41:37 2014
@@ -96,8 +96,6 @@ AC_DEFUN(SVN_LIB_SQLITE,
     fi
   ])
 
-  SVN_SQLITE_BROKEN_OPTIONS
-
   AC_SUBST(SVN_SQLITE_INCLUDES)
   AC_SUBST(SVN_SQLITE_LIBS)
 ])
@@ -306,56 +304,3 @@ AC_DEFUN(_SVN_SQLITE_DSO_LIBS,
     AC_MSG_RESULT(none)
   fi
 ])
-
-dnl SQLIte 3.8.1 - 3.8.3 have a buggy SQLITE_ENABLE_STAT3 and
-dnl SQLITE_ENABLE_STAT4 options.  Discourage users from using
-dnl these versions.  See this SQLite bug:
-dnl https://www.sqlite.org/src/info/4c86b126f2
-AC_DEFUN(SVN_SQLITE_BROKEN_OPTIONS,
-[
-  AC_MSG_CHECKING([for broken sqlite options])
-
-  SVN_SQLITE_VERNUM_PARSE([3.8.1], [sqlite_min_buggy_stat])
-  SVN_SQLITE_VERNUM_PARSE([3.8.3], [sqlite_max_buggy_stat])
-
-  save_CPPFLAGS="$CPPFLAGS"
-  save_LDFLAGS="$LDFLAGS"
-
-  CPPFLAGS="$CPPFLAGS $SVN_SQLITE_INCLUDES"
-  LDFLAGS="$LDFLAGS $SVN_SQLITE_LIBS"
-
-  if test -z "$sqlite_amalg"; then
-
-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <stdlib.h>
-#include <sqlite3.h>
-
-int main() {
-#if SQLITE_VERSION_NUMBER < $sqlite_min_buggy_stat || SQLITE_VERSION_NUMBER > $sqlite_max_buggy_stat
-  exit(0);
-#else
-  exit(sqlite3_compileoption_used("ENABLE_STAT3") | sqlite3_compileoption_used("ENABLE_STAT4"));
-#endif
-}
-    ]])],
-    [AC_MSG_RESULT([okay])],
-    [AC_MSG_ERROR([SQLITE_ENABLE_STAT3 or SQLITE_ENABLE_STAT4 defined with buggy SQLite version])],
-    [AC_MSG_RESULT([skipped])])
-
-  else
-
-    AC_TRY_CPP([
-#include "$sqlite_amalg"
-#if SQLITE_VERSION_NUMBER >= $sqlite_min_buggy_stat && \
-    SQLITE_VERSION_NUMBER <= $sqlite_max_buggy_stat && \
-    (defined(SQLITE_ENABLE_STAT3) || defined(SQLITE_ENABLE_STAT4))
-#error "SQLITE_ENABLE_STAT3 or SQLITE_ENABLE_STAT4 found"
-#endif],
-      [AC_MSG_RESULT([okay])],
-      [AC_MSG_ERROR([SQLITE_ENABLE_STAT3 or SQLITE_ENABLE_STAT4 defined with buggy SQLite version])
-    ])
-  fi
-
-  CPPFLAGS="$save_CPPFLAGS"
-  LDFLAGS="$save_LDFLAGS"
-])

Modified: subversion/trunk/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_error_codes.h?rev=1567282&r1=1567281&r2=1567282&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_error_codes.h (original)
+++ subversion/trunk/subversion/include/svn_error_codes.h Tue Feb 11 18:41:37 2014
@@ -1420,11 +1420,6 @@ SVN_ERROR_START
              SVN_ERR_MISC_CATEGORY_START + 42,
              "Additional errors:")
 
-  /** @since New in 1.9. */
-  SVN_ERRDEF(SVN_ERR_UNSUPPORTED_DEPENDENCY,
-             SVN_ERR_MISC_CATEGORY_START + 43,
-             "Dependency failed runtime compatibility test")
-
   /* command-line client errors */
 
   SVN_ERRDEF(SVN_ERR_CL_ARG_PARSING_ERROR,

Modified: subversion/trunk/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sqlite.c?rev=1567282&r1=1567281&r2=1567282&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sqlite.c Tue Feb 11 18:41:37 2014
@@ -1076,25 +1076,6 @@ svn_sqlite__open(svn_sqlite__db_t **db, 
   SVN_ERR(svn_atomic__init_once(&sqlite_init_state,
                                 init_sqlite, NULL, scratch_pool));
 
-  /* runtime check for https://www.sqlite.org/src/info/4c86b126f2 */
-#if SQLITE_VERSION_NUMBER > 3008000 && SQLITE_VERSION_NUMBER < 3008004
-  /* 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));
 
   SVN_ERR(internal_open(&(*db)->db3, path, mode, scratch_pool));