diff options
author | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2018-11-13 15:00:51 -0500 |
---|---|---|
committer | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2018-11-13 15:15:15 -0500 |
commit | 31efa2d9e1e73ad5d5022a69fda8f46c7c8c2b04 (patch) | |
tree | 389bccb93a531f3fb38d1dc09319047d7a26e8bf /activerecord/test/cases | |
parent | 1cbc6555f5eeaae32abaf7f35db807cbb3a3a9c9 (diff) | |
download | rails-31efa2d9e1e73ad5d5022a69fda8f46c7c8c2b04.tar.gz rails-31efa2d9e1e73ad5d5022a69fda8f46c7c8c2b04.tar.bz2 rails-31efa2d9e1e73ad5d5022a69fda8f46c7c8c2b04.zip |
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
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/adapters/sqlite3/bind_parameter_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/sqlite3/bind_parameter_test.rb b/activerecord/test/cases/adapters/sqlite3/bind_parameter_test.rb new file mode 100644 index 0000000000..93a7dafebd --- /dev/null +++ b/activerecord/test/cases/adapters/sqlite3/bind_parameter_test.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +require "cases/helper" +require "models/topic" + +module ActiveRecord + module ConnectionAdapters + class SQLite3Adapter + class BindParameterTest < ActiveRecord::SQLite3TestCase + def test_too_many_binds + topics = Topic.where(id: (1..999).to_a << 2**63) + assert_equal Topic.count, topics.count + + topics = Topic.where.not(id: (1..999).to_a << 2**63) + assert_equal 0, topics.count + end + end + end + end +end |