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

Unified Diff: sql/connection.cc

Issue 10829062: Upstream sqlite gyp changes for Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added assert Created 8 years, 4 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
« no previous file with comments | « no previous file | sql/connection_unittest.cc » ('j') | 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 c7666f9a77542180cdf96143f65547b25b33c0bf..ea3dacbb6ba025dc248590a40031cc4a508541f4 100644
--- a/sql/connection.cc
+++ b/sql/connection.cc
@@ -200,12 +200,27 @@ bool Connection::Raze() {
// Get the page size from the current connection, then propagate it
// to the null database.
- Statement s(GetUniqueStatement("PRAGMA page_size"));
- if (!s.Step())
- return false;
- const std::string sql = StringPrintf("PRAGMA page_size=%d", s.ColumnInt(0));
- if (!null_db.Execute(sql.c_str()))
- return false;
+ {
+ Statement s(GetUniqueStatement("PRAGMA page_size"));
+ if (!s.Step())
+ return false;
+ const std::string sql = StringPrintf("PRAGMA page_size=%d",
+ s.ColumnInt(0));
+ if (!null_db.Execute(sql.c_str()))
+ return false;
+ }
+
+ // Get the value of auto_vacuum from the current connection, then propagate it
+ // to the null database.
+ {
+ Statement s(GetUniqueStatement("PRAGMA auto_vacuum"));
+ if (!s.Step())
+ return false;
+ const std::string sql = StringPrintf("PRAGMA auto_vacuum=%d",
+ s.ColumnInt(0));
+ if (!null_db.Execute(sql.c_str()))
+ return false;
+ }
// The page size doesn't take effect until a database has pages, and
// at this point the null database has none. Changing the schema
« no previous file with comments | « no previous file | sql/connection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698