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