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

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: rebase Created 4 years, 6 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 25072904630353ae390d07bc63108e6da64c10c5..ab84266673330e57bb24e2496743bd9f73f3948d 100644
--- a/sql/connection.cc
+++ b/sql/connection.cc
@@ -243,8 +243,9 @@ bool Connection::IsExpectedSqliteError(int error) {
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