| Index: sql/connection.cc
|
| diff --git a/sql/connection.cc b/sql/connection.cc
|
| index 003005a8e6294247df3d5bbea887a54ccd365cd7..9f7eb2bcdcdb29fd981ea45127993dda0de88d18 100644
|
| --- a/sql/connection.cc
|
| +++ b/sql/connection.cc
|
| @@ -260,7 +260,15 @@ void Connection::ReportDiagnosticInfo(int extended_error, Statement* stmt) {
|
| std::string debug_info;
|
| const int error = (extended_error & 0xFF);
|
| if (error == SQLITE_CORRUPT) {
|
| + // CollectCorruptionInfo() is implemented in terms of sql::Connection,
|
| + // prevent reentrant calls to the error callback.
|
| + // TODO(shess): Rewrite IntegrityCheckHelper() in terms of raw SQLite.
|
| + ErrorCallback original_callback = std::move(error_callback_);
|
| + reset_error_callback();
|
| +
|
| debug_info = CollectCorruptionInfo();
|
| +
|
| + error_callback_ = std::move(original_callback);
|
| } else {
|
| debug_info = CollectErrorInfo(extended_error, stmt);
|
| }
|
|
|