Author: danielsh
Date: Mon Jun 27 17:00:47 2011
New Revision: 1140239
URL: http://svn.apache.org/viewvc?rev=1140239&view=rev
Log:
Check sqlite version at s/compile-run/run-time/.
Suggested by: arfrever
* subversion/libsvn_subr/sqlite.c
(svn_sqlite__open): Use sqlite3_version() instead of
SQLITE_VERSION_AT_LEAST().
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=1140239&r1=1140238&r2=1140239&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sqlite.c Mon Jun 27 17:00:47 2011
@@ -914,14 +914,18 @@ svn_sqlite__open(svn_sqlite__db_t **db,
sqlite3_profile((*db)->db3, sqlite_profiler, (*db)->db3);
#endif
-#if SQLITE_VERSION_AT_LEAST(3,7,7) \
- && !SQLITE_VERSION_AT_LEAST(3,7,8) \
- && defined(SQLITE_SCHEMA)
- /* See message <[email protected]> on dev@
*/
- SVN_ERR(exec_sql2(*db, "PRAGMA case_sensitive_like=1;", SQLITE_SCHEMA));
-#else
- SVN_ERR(exec_sql2(*db, "PRAGMA case_sensitive_like=1;", SQLITE_OK));
-#endif /* 3.7.7 && SQLITE_SCHEMA */
+ /* Work around a bug in SQLite 3.7.7.
+ See message <[email protected]> on dev@.
+ */
+ {
+ int ignored_err = SQLITE_OK;
+#ifdef SQLITE_SCHEMA
+ if (!strcmp(sqlite3_libversion(), "3.7.7"))
+ ignored_err = SQLITE_SCHEMA;
+#endif
+
+ SVN_ERR(exec_sql2(*db, "PRAGMA case_sensitive_like=1;", ignored_err));
+ }
SVN_ERR(exec_sql(*db,
/* Disable synchronization to disable the explicit disk flushes