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/12 20:31:43 UTC
svn commit: r1567735 - in /subversion/branches/1.8.x: ./ STATUS
subversion/libsvn_subr/sqlite.c
Author: breser
Date: Wed Feb 12 19:31:43 2014
New Revision: 1567735
URL: http://svn.apache.org/r1567735
Log:
Merge r1567064 from trunk:
* r1567064
Explicitly apply some Sqlite defaults to avoid unwanted side effects.
Justification:
We found distributions that enabled other flags. This might fix other
similar cases.
Votes:
+1: rhuijben, breser, philip
Modified:
subversion/branches/1.8.x/ (props changed)
subversion/branches/1.8.x/STATUS
subversion/branches/1.8.x/subversion/libsvn_subr/sqlite.c
Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1567064
Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1567735&r1=1567734&r2=1567735&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Wed Feb 12 19:31:43 2014
@@ -189,11 +189,3 @@ Veto-blocked changes:
Approved changes:
=================
-
- * r1567064
- Explicitly apply some Sqlite defaults to avoid unwanted side effects.
- Justification:
- We found distributions that enabled other flags. This might fix other
- similar cases.
- Votes:
- +1: rhuijben, breser, philip
Modified: subversion/branches/1.8.x/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_subr/sqlite.c?rev=1567735&r1=1567734&r2=1567735&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_subr/sqlite.c Wed Feb 12 19:31:43 2014
@@ -945,7 +945,13 @@ svn_sqlite__open(svn_sqlite__db_t **db,
/* Enable recursive triggers so that a user trigger will fire
in the deletion phase of an INSERT OR REPLACE statement.
Requires SQLite >= 3.6.18 */
- "PRAGMA recursive_triggers=ON;"));
+ "PRAGMA recursive_triggers=ON;"
+ /* Enforce current Sqlite default behavior. Some distributions
+ might change the Sqlite defaults without realizing how this
+ affects application(read: Subversion) performance/behavior. */
+ "PRAGMA foreign_keys=OFF;" /* SQLITE_DEFAULT_FOREIGN_KEYS*/
+ "PRAGMA locking_mode = NORMAL;" /* SQLITE_DEFAULT_LOCKING_MODE */
+ ));
#if defined(SVN_DEBUG)
/* When running in debug mode, enable the checking of foreign key
@@ -954,6 +960,14 @@ svn_sqlite__open(svn_sqlite__db_t **db,
SVN_ERR(exec_sql(*db, "PRAGMA foreign_keys=ON;"));
#endif
+#ifdef SVN_SQLITE_REVERSE_UNORDERED_SELECTS
+ /* When enabled, this PRAGMA causes SELECT statements without an ORDER BY
+ clause to emit their results in the reverse order of what they normally
+ would. This can help detecting invalid assumptions about the result
+ order.*/
+ SVN_ERR(exec_sql(*db, "PRAGMA reverse_unordered_selects=ON;"));
+#endif
+
/* Store temporary tables in RAM instead of in temporary files, but don't
fail on this if this option is disabled in the sqlite compilation by
setting SQLITE_TEMP_STORE to 0 (always to disk) */