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

Unified Diff: sql/connection.h

Issue 11369126: Make sql::Connection::Raze() more robust against corruptions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix for android. Created 8 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
« no previous file with comments | « no previous file | sql/connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/connection.h
diff --git a/sql/connection.h b/sql/connection.h
index 319517e978b5dd8d1f663a24c088cc99cd4eca5b..8cf4d715f5d2fe4501b04c3a158fdaed0a83c447 100644
--- a/sql/connection.h
+++ b/sql/connection.h
@@ -195,6 +195,19 @@ class SQL_EXPORT Connection {
// Since Raze() is expected to be called in unexpected situations,
// these all return false, since it is unlikely that the caller
// could fix them.
+ //
+ // The database's page size is taken from |page_size_|. The
+ // existing database's |auto_vacuum| setting is lost (the
+ // possibility of corruption makes it unreliable to pull it from the
+ // existing database). To re-enable on the empty database requires
+ // running "PRAGMA auto_vacuum = 1;" then "VACUUM".
+ //
+ // NOTE(shess): For Android, SQLITE_DEFAULT_AUTOVACUUM is set to 1,
+ // so Raze() sets auto_vacuum to 1.
+ //
+ // TODO(shess): Raze() needs a connection so cannot clear SQLITE_NOTADB.
+ // TODO(shess): Bake auto_vacuum into Connection's API so it can
+ // just pick up the default.
bool Raze();
bool RazeWithTimout(base::TimeDelta timeout);
« no previous file with comments | « no previous file | sql/connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698