SQL: Disallow implicit integer downconversion on BindInt

Calling sql::Statement::BindInt() with an int64_t argument silently
downconverted, potentially saving incorrect data to a database.
sql::Statement::BindInt64(int64_t) should be used instead.

Introduce an uncallable sql::Statement::BindInt(int64_t) overload to
fail the compile. This also catches calling BindInt with uint32_t. Fix
up various callers that were silently downconverting.

Bug: 908690
Change-Id: I1472ad5461c7e60bfc011def85a48bc9ca216734
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1935607
Commit-Queue: Joshua Bell <[email protected]>
Reviewed-by: Becca Hughes <[email protected]>
Reviewed-by: Cathy Li <[email protected]>
Reviewed-by: Jan Wilken Dörrie <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Victor Costan <[email protected]>
Cr-Commit-Position: refs/heads/master@{#723469}
diff --git a/sql/statement.h b/sql/statement.h
index 6144b23..6983e21 100644
--- a/sql/statement.h
+++ b/sql/statement.h
@@ -106,6 +106,7 @@
   bool BindNull(int col);
   bool BindBool(int col, bool val);
   bool BindInt(int col, int val);
+  bool BindInt(int col, int64_t val) = delete;  // Call BindInt64() instead.
   bool BindInt64(int col, int64_t val);
   bool BindDouble(int col, double val);
   bool BindCString(int col, const char* val);