[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: sqlite3 3.7.11 breaks svnversion: E200030: sqlite: callback requested query abort

From: Daniel Shahaf <danielsh_at_elego.de>
Date: Sat, 21 Apr 2012 13:21:54 +0300

Greg Stein wrote on Fri, Apr 20, 2012 at 23:15:05 -0400:
> Seems we can/should have a runtime version check? Avoid running with 3.7.11?

+1

Index: subversion/libsvn_subr/sqlite.c
===================================================================
--- subversion/libsvn_subr/sqlite.c (revision 1327986)
+++ subversion/libsvn_subr/sqlite.c (working copy)
@@ -747,6 +747,16 @@ svn_sqlite__open(svn_sqlite__db_t **db, const char
                  int unused1, const char * const *unused2,
                  apr_pool_t *result_pool, apr_pool_t *scratch_pool)
 {
+#if !SQLITE_VERSION_AT_LEAST(3,7,12)
+ const char *runtime_version = sqlite3_libversion();
+
+ /* Bug in the RELEASE statement, schedule to be fixed in 3.7.12. */
+ if (!strcmp(runtime_version, "3.7.11"))
+ return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+ _("Cannot use SQLite 3.7.11; upgrade to 3.7.12 "
+ "or downgrade to 3.7.10"));
+#endif /* lt 3.7.12 */
+
   SVN_ERR(svn_atomic__init_once(&sqlite_init_state,
                                 init_sqlite, NULL, scratch_pool));
 
@@ -774,10 +784,11 @@ svn_sqlite__open(svn_sqlite__db_t **db, const char
    */
   {
     int ignored_err = SQLITE_OK;
+
 #if !SQLITE_VERSION_AT_LEAST(3,7,8) && defined(SQLITE_SCHEMA)
- if (!strcmp(sqlite3_libversion(), "3.7.7"))
+ if (!strcmp(runtime_version, "3.7.7"))
       ignored_err = SQLITE_SCHEMA;
-#endif
+#endif /* lt 3.7.8 && defined(SQLITE_SCHEMA) */
 
     SVN_ERR(exec_sql2(*db, "PRAGMA case_sensitive_like=1;", ignored_err));
   }
Received on 2012-04-21 12:49:14 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.