Description of problem: sqlite 3.7.15 breaks ActiveRecord (Ruby on Rails) test suite Version-Release number of selected component (if applicable): $ rpm -q sqlite sqlite-3.7.15-1.fc19.x86_64 How reproducible: Always Steps to Reproduce: 1. $ git clone https://github.com/rails/rails.git 2. $ cd rails/activerecord 3. $ ruby -I.:test:lib test/cases/associations/nested_through_associations_test.rb Actual results: $ rpm -q sqlite sqlite-3.7.15-1.fc19.x86_64 $ ruby -I.:test:lib test/cases/associations/nested_through_associations_test.rb *** Mocha deprecation warning: Change `require 'mocha'` to `require 'mocha/setup'`. Using sqlite3 with Identity Map off Run options: # Running tests: .F.........F............................................. Finished tests in 1.205003s, 47.3028 tests/s, 132.7797 assertions/s. 1) Failure: test_distinct_has_many_through_a_has_many_through_association_on_through_reflection(NestedThroughAssociationsTest) [test/cases/associations/nested_through_associations_test.rb:393]: <[#<Subscriber nick: "alterself", name: "Luke Holden", books_count: 0>, #<Subscriber nick: "webster132", name: "David Heinemeier Hansson", books_count: 0>]> expected but was <[#<Subscriber nick: "webster132", name: "David Heinemeier Hansson", books_count: 0>, #<Subscriber nick: "alterself", name: "Luke Holden", books_count: 0>]>. 2) Failure: test_has_many_through_has_many_through_with_has_many_source_reflection(NestedThroughAssociationsTest) [test/cases/associations/nested_through_associations_test.rb:82]: <[#<Subscriber nick: "alterself", name: "Luke Holden", books_count: 0>, #<Subscriber nick: "webster132", name: "David Heinemeier Hansson", books_count: 0>, #<Subscriber nick: "webster132", name: "David Heinemeier Hansson", books_count: 0>]> expected but was <[#<Subscriber nick: "webster132", name: "David Heinemeier Hansson", books_count: 0>, #<Subscriber nick: "webster132", name: "David Heinemeier Hansson", books_count: 0>, #<Subscriber nick: "alterself", name: "Luke Holden", books_count: 0>]>. 57 tests, 160 assertions, 2 failures, 0 errors, 0 skips Expected results: $ rpm -q sqlite sqlite-3.7.14.1-1.fc19.x86_64 $ ruby -I.:test:lib test/cases/associations/nested_through_associations_test.rb *** Mocha deprecation warning: Change `require 'mocha'` to `require 'mocha/setup'`. Using sqlite3 with Identity Map off Run options: # Running tests: ......................................................... Finished tests in 1.132622s, 50.3257 tests/s, 141.2651 assertions/s. 57 tests, 160 assertions, 0 failures, 0 errors, 0 skips Additional info: I have opened ticket in Ruby on Rails issue tracker first: https://github.com/rails/rails/issues/8724 Since I am not following sqlite development, I'd appreciate your help with solving this issue. Also, I am afraid that this might have negative impact on other SW using sqlite, so I am not sure if revert should not be considered.
I've a feeling this might be fixed in 3.7.15.2 (built for rawhide yesterday, or in koji http://koji.fedoraproject.org/koji/taskinfo?taskID=4854807): "Fix a bug, introduced in version 3.7.15, that causes an ORDER BY clause to be optimized out of a three-way join when the ORDER BY is actually required. Ticket 598f5f7596b055" Can you test with the new version? The reproducer doesn't work for me, I'm probably missing some other ruby bits on my system but I'm pretty clueless when it comes to ruby...
Thank you for heads up. It works now.
Okay, thanks for confirming.