| Index: sql/connection.cc
|
| diff --git a/sql/connection.cc b/sql/connection.cc
|
| index 2d7baf25ad70279ffef454f35d29bbb850db663e..a9b7372e0baa76670dc468cf2e52e6d1c7cfd21c 100644
|
| --- a/sql/connection.cc
|
| +++ b/sql/connection.cc
|
| @@ -179,12 +179,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
|
|
|