From 31efa2d9e1e73ad5d5022a69fda8f46c7c8c2b04 Mon Sep 17 00:00:00 2001 From: Gannon McGibbon Date: Tue, 13 Nov 2018 15:00:51 -0500 Subject: Adjust bind length of SQLite to default (999) Change `#bind_params_length` in SQLite adapter to return the default maximum amount (999). See https://www.sqlite.org/limits.html --- .../lib/active_record/connection_adapters/sqlite3_adapter.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index e0355a316b..3312c3de01 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -396,6 +396,12 @@ module ActiveRecord end private + # See https://www.sqlite.org/limits.html, + # the default value is 999 when not configured. + def bind_params_length + 999 + end + def check_version if sqlite_version < "3.8.0" raise "Your version of SQLite (#{sqlite_version}) is too old. Active Record supports SQLite >= 3.8." -- cgit v1.2.3