aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-09-09 03:30:45 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-09-12 01:11:38 +0900
commita50eacb03cf3df1d1cbc227ea0115901e0327f1c (patch)
tree19e47b31a2aedbb8f34317fcf2dbe6b5d5aeb2c1 /activerecord/test/schema
parent82ac7555ab69c1ae11360d2b9bd8dfd723a13485 (diff)
downloadrails-a50eacb03cf3df1d1cbc227ea0115901e0327f1c.tar.gz
rails-a50eacb03cf3df1d1cbc227ea0115901e0327f1c.tar.bz2
rails-a50eacb03cf3df1d1cbc227ea0115901e0327f1c.zip
Eager loading/preloading should be worked regardless of large number of records
Since 213796f, bind params are used for IN clause if enabled prepared statements. Unfortunately, most adapter modules have a limitation for # of bind params (mysql2 65535, pg 65535, sqlite3 250000). So if eager loading large number of records at once, that query couldn't be sent to the database. Since eager loading/preloading queries are auto-generated by Active Record itself, so it should be worked regardless of large number of records like as before. Fixes #33702.
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r--activerecord/test/schema/schema.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb
index 266e55f682..27c7348f5c 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -160,6 +160,7 @@ ActiveRecord::Schema.define do
create_table :citations, force: true do |t|
t.column :book1_id, :integer
t.column :book2_id, :integer
+ t.references :citation
end
create_table :clubs, force: true do |t|