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