[sql] Also call ShouldIgnoreSqliteError() in Release build.
https://crrev.com/92a2ab1f1d0cdff39e6d506c4cb6a80038baeeb3 put the test (which has a side effect) in DLOG_IF which doesn't apply in Release builds. BUG=none Review URL: https://codereview.chromium.org/1075993003 Cr-Commit-Position: refs/heads/master@{#324697}
This commit is contained in:
@ -725,8 +725,8 @@ scoped_refptr<Connection::StatementRef> Connection::GetUniqueStatement(
|
||||
int rc = sqlite3_prepare_v2(db_, sql, -1, &stmt, NULL);
|
||||
if (rc != SQLITE_OK) {
|
||||
// This is evidence of a syntax error in the incoming SQL.
|
||||
DLOG_IF(FATAL, !ShouldIgnoreSqliteError(rc))
|
||||
<< "SQL compile error " << GetErrorMessage();
|
||||
if (!ShouldIgnoreSqliteError(rc))
|
||||
DLOG(FATAL) << "SQL compile error " << GetErrorMessage();
|
||||
|
||||
// It could also be database corruption.
|
||||
OnSqliteError(rc, NULL, sql);
|
||||
@ -745,8 +745,8 @@ scoped_refptr<Connection::StatementRef> Connection::GetUntrackedStatement(
|
||||
int rc = sqlite3_prepare_v2(db_, sql, -1, &stmt, NULL);
|
||||
if (rc != SQLITE_OK) {
|
||||
// This is evidence of a syntax error in the incoming SQL.
|
||||
DLOG_IF(FATAL, !ShouldIgnoreSqliteError(rc))
|
||||
<< "SQL compile error " << GetErrorMessage();
|
||||
if (!ShouldIgnoreSqliteError(rc))
|
||||
DLOG(FATAL) << "SQL compile error " << GetErrorMessage();
|
||||
return new StatementRef(NULL, NULL, false);
|
||||
}
|
||||
return new StatementRef(NULL, stmt, true);
|
||||
|
Reference in New Issue
Block a user