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

Unified Diff: sql/statement.cc

Issue 8966003: Update webdata files to take advantage of DLOG(FATAL) in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add header comments for a couple tricky error cases. Created 9 years 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
« no previous file with comments | « sql/statement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/statement.cc
diff --git a/sql/statement.cc b/sql/statement.cc
index fd73b0f588561f235d77d82529574ae7e16be05d..a5daae49a6029f97b0950d4773a840cd5ac222cc 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;
}
« no previous file with comments | « sql/statement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698