Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: sql/connection.cc

Issue 16356007: Disable sqlite lookaside buffers by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« sql/connection.h ('K') | « sql/connection.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/connection.cc
diff --git a/sql/connection.cc b/sql/connection.cc
index 09d8195df502d440430f8124538733d8a4c776e9..956660ef05b12a665554afee5cda11d2ec63190b 100644
--- a/sql/connection.cc
+++ b/sql/connection.cc
@@ -631,6 +631,12 @@ bool Connection::OpenInternal(const std::string& file_name) {
return false;
}
+ if (!enable_lookaside_buffer_) {
+ // Disable lookaside buffer. Must be run immediatly after opening the
+ // database before any SQL statements are run.
+ sqlite3_db_config(db_, SQLITE_DBCONFIG_LOOKASIDE, NULL, 0, 0);
Scott Hess - ex-Googler 2013/06/05 17:58:49 And maybe buff up the first line of the comment to
rmcilroy 2013/06/05 22:24:47 Done.
+ }
+
// sqlite3_open() does not actually read the database file (unless a
// hot journal is found). Successfully executing this pragma on an
// existing database requires a valid header on page 1.
« sql/connection.h ('K') | « sql/connection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698