| Index: sql/connection.cc
|
| diff --git a/sql/connection.cc b/sql/connection.cc
|
| index 6e02cd755f56a31342f6291b4ae418303d5781c9..cb3a06a917ad4f93574083dea151310032a83a59 100644
|
| --- a/sql/connection.cc
|
| +++ b/sql/connection.cc
|
| @@ -1050,9 +1050,10 @@ int Connection::OnSqliteError(int err, sql::Statement *stmt, const char* sql) {
|
| return err;
|
| }
|
|
|
| -// TODO(shess): Allow specifying integrity_check versus quick_check.
|
| // TODO(shess): Allow specifying maximum results (default 100 lines).
|
| -bool Connection::IntegrityCheck(std::vector<std::string>* messages) {
|
| +bool Connection::IntegrityCheck(
|
| + std::vector<std::string>* messages,
|
| + bool quick) {
|
| messages->clear();
|
|
|
| // This has the side effect of setting SQLITE_RecoveryMode, which
|
| @@ -1065,7 +1066,8 @@ bool Connection::IntegrityCheck(std::vector<std::string>* messages) {
|
|
|
| bool ret = false;
|
| {
|
| - const char kSql[] = "PRAGMA integrity_check";
|
| + const char* kSql = quick ?
|
| + "PRAGMA quick_check" : "PRAGMA integrity_check";
|
| sql::Statement stmt(GetUniqueStatement(kSql));
|
|
|
| // The pragma appears to return all results (up to 100 by default)
|
|
|