summaryrefslogtreecommitdiffstats
path: root/sql/statement.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/statement.cc')
-rw-r--r--sql/statement.cc5
1 files changed, 5 insertions, 0 deletions
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;
}