| 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
|
|
|