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

Unified Diff: sql/recovery.cc

Issue 1414563010: [sql] Disable memory-mapping under sql::Recovery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
Index: sql/recovery.cc
diff --git a/sql/recovery.cc b/sql/recovery.cc
index 4308129d726467f0a868e721d31d09e66bbf96a7..6691d07b9aa88c698d9496da85e26977292438fc 100644
--- a/sql/recovery.cc
+++ b/sql/recovery.cc
@@ -141,6 +141,9 @@ Recovery::Recovery(Connection* connection)
if (db_->page_size_)
recover_db_.set_page_size(db_->page_size_);
+ // Files with I/O errors cannot be safely memory-mapped.
+ recover_db_.set_mmap_disabled();
+
// TODO(shess): This may not handle cases where the default page
// size is used, but the default has changed. I do not think this
// has ever happened. This could be handled by using "PRAGMA
« sql/connection.cc ('K') | « sql/connection.cc ('k') | sql/recovery_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698