Index: sql/connection.cc |
diff --git a/sql/connection.cc b/sql/connection.cc |
index 003005a8e6294247df3d5bbea887a54ccd365cd7..20dfb323ee2d4100f2ab80b23ff8a00256634843 100644 |
--- a/sql/connection.cc |
+++ b/sql/connection.cc |
@@ -43,6 +43,8 @@ namespace { |
// TODO(shess): Better story on this. http://crbug.com/56559 |
const int kBusyTimeoutSeconds = 1; |
+bool mmap_disabled_default = false; |
Scott Hess - ex-Googler
2016/01/26 21:51:08
Probably needs to be g_mmap_disabled_default, I th
vichang1
2016/01/27 15:19:16
done.
|
+ |
class ScopedBusyTimeout { |
public: |
explicit ScopedBusyTimeout(sqlite3* db) |
@@ -254,6 +256,12 @@ bool Connection::ShouldIgnoreSqliteCompileError(int error) { |
basic_error == SQLITE_CORRUPT; |
} |
+// static |
+void Connection::set_mmap_disabled_by_default() { |
+ mmap_disabled_default = true; |
+} |
+ |
+ |
void Connection::ReportDiagnosticInfo(int extended_error, Statement* stmt) { |
AssertIOAllowed(); |
@@ -339,7 +347,7 @@ Connection::Connection() |
needs_rollback_(false), |
in_memory_(false), |
poisoned_(false), |
- mmap_disabled_(false), |
+ mmap_disabled_(mmap_disabled_default), |
mmap_enabled_(false), |
total_changes_at_last_release_(0), |
stats_histogram_(NULL), |