From a50eacb03cf3df1d1cbc227ea0115901e0327f1c Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 9 Sep 2018 03:30:45 +0900 Subject: 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. --- activerecord/test/fixtures/citations.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 activerecord/test/fixtures/citations.yml (limited to 'activerecord/test/fixtures/citations.yml') diff --git a/activerecord/test/fixtures/citations.yml b/activerecord/test/fixtures/citations.yml new file mode 100644 index 0000000000..d31cb8efa1 --- /dev/null +++ b/activerecord/test/fixtures/citations.yml @@ -0,0 +1,4 @@ +<% 65536.times do |i| %> +fixture_no_<%= i %>: + id: <%= i %> +<% end %> -- cgit v1.2.3