From bed29d94d90663ab161e5832677dae9dd4d4be13 Mon Sep 17 00:00:00 2001 From: "gbillock@chromium.org" Date: Thu, 22 Dec 2011 19:25:51 +0000 Subject: Update webdata files to take advantage of DLOG(FATAL) in sql/Statement and Connection. R=shess@chromium.org BUG= TEST=webdata/*Test*.* Review URL: http://codereview.chromium.org/8966003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115574 0039d316-1c4b-4281-b951-d872f2087c98 --- sql/statement.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sql/statement.cc') diff --git a/sql/statement.cc b/sql/statement.cc index fd73b0f..a5daae4 100644 --- a/sql/statement.cc +++ b/sql/statement.cc @@ -256,6 +256,11 @@ const char* Statement::GetSQLStatement() { } bool Statement::CheckOk(int err) const { + // Binding to a non-existent variable is evidence of a serious error. + // TODO(gbillock,shess): make this invalidate the statement so it + // can't wreak havoc. + if (err == SQLITE_RANGE) + DLOG(FATAL) << "Bind value out of range"; return err == SQLITE_OK; } -- cgit v1.1