subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1181666 - /subversion/trunk/subversion/libsvn_subr/sqlite.c
Date Tue, 11 Oct 2011 09:15:03 GMT
Author: philip
Date: Tue Oct 11 09:15:03 2011
New Revision: 1181666

URL: http://svn.apache.org/viewvc?rev=1181666&view=rev
Log:
Tweak the SQLite setup for compatibility with OS X 10.7.

* subversion/libsvn_subr/sqlite.c
  (init_sqlite): Don't set the default shared cache behaviour.
  (internal_open): Make each connection use a shared cache.

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=1181666&r1=1181665&r2=1181666&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sqlite.c Tue Oct 11 09:15:03 2011
@@ -637,12 +637,6 @@ init_sqlite(void *baton, apr_pool_t *poo
 
 #endif /* APR_HAS_THRADS */
 
-  /* SQLite 3.5 allows sharing cache instances, even in a multithreaded
-     environment. This allows sharing cached data when we open a database
-     more than once (Very common in the current pre-single-database state) */
-  SQLITE_ERR_MSG(sqlite3_enable_shared_cache(TRUE),
-                 _("Could not initialize SQLite shared cache"));
-
   return SVN_NO_ERROR;
 }
 
@@ -673,6 +667,13 @@ internal_open(sqlite3 **db3, const char 
     flags |= SQLITE_OPEN_NOMUTEX;
 #endif
 
+    /* SQLite 3.5 allows sharing cache instances, even in a multithreaded
+       environment. This allows sharing cached data when we open a database
+       more than once.
+
+       OS X 10.7 doesn't support sqlite3_enable_shared_cache. */
+    flags |= SQLITE_OPEN_SHAREDCACHE;
+
     /* Open the database. Note that a handle is returned, even when an error
        occurs (except for out-of-memory); thus, we can safely use it to
        extract an error message and construct an svn_error_t. */



Mime
View raw message