From b8569b9337309c2d6c72566a3426994b6da443d7 Mon Sep 17 00:00:00 2001 From: Kassio Borges Date: Fri, 13 Dec 2013 11:37:19 -0200 Subject: Fix mysql to support duplicated column names This will fix the [broken test](https://github.com/rails/rails/commit/4a2650836680f51490e999c3c8441a2f9adff96e) `test_with_limiting_with_custom_select`. The query's result was built in a hash with column name as key, if the result have a duplicated column name the last value was overriding the first one. --- activerecord/test/cases/finder_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/cases/finder_test.rb') diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index 7a00f7fa8f..5125d5df2a 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -855,7 +855,7 @@ class FinderTest < ActiveRecord::TestCase def test_with_limiting_with_custom_select posts = Post.references(:authors).merge( - :includes => :author, :select => ' posts.*, authors.id as "author_id"', + :includes => :author, :select => 'posts.*, authors.id as "author_id"', :limit => 3, :order => 'posts.id' ).to_a assert_equal 3, posts.size -- cgit v1.2.3