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

Unified Diff: sql/connection.cc

Issue 1832173002: [sql] Database recovery system for Shortcuts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments from #9 and #10. Created 4 years, 8 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
Index: sql/connection.cc
diff --git a/sql/connection.cc b/sql/connection.cc
index b1be62f586a782d64fca587e671254f912e29493..31c17e92b52c22041ae25ba48b9b01719e552ef9 100644
--- a/sql/connection.cc
+++ b/sql/connection.cc
@@ -266,8 +266,9 @@ void Connection::set_mmap_disabled_by_default() {
void Connection::ReportDiagnosticInfo(int extended_error, Statement* stmt) {
AssertIOAllowed();
- std::string debug_info;
+ // Trim extended error codes.
const int error = (extended_error & 0xFF);
+ std::string debug_info;
if (error == SQLITE_CORRUPT) {
// CollectCorruptionInfo() is implemented in terms of sql::Connection,
// prevent reentrant calls to the error callback.

Powered by Google App Engine
This is Rietveld 408576698