0

[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:
shess
2015-04-10 15:30:02 -07:00
committed by Commit bot
parent 325565102c
commit 193bfb62b0

@ -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);