mirror of
https://github.com/github/rails.git
synced 2026-01-29 16:28:09 -05:00
Reverted old select_limited_ids_list postgresql fix that caused issues in mysql. Closes #5851 [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5265 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* Reverted old select_limited_ids_list postgresql fix that caused issues in mysql. Closes #5851 [Rick]
|
||||
|
||||
* Removes the ability for eager loaded conditions to be interpolated, since there is no model instance to use as a context for interpolation. #5553 [turnip@turnipspatch.com]
|
||||
|
||||
* Added timeout option to SQLite3 configurations to deal more gracefully with SQLite3::BusyException, now the connection can instead retry for x seconds to see if the db clears up before throwing that exception #6126 [wreese@gmail.com]
|
||||
|
||||
@@ -1196,11 +1196,10 @@ module ActiveRecord
|
||||
sql = "SELECT "
|
||||
sql << "DISTINCT #{table_name}." if include_eager_conditions?(options) || include_eager_order?(options)
|
||||
sql << primary_key
|
||||
sql << ", #{options[:order].split(',').collect { |s| s.split.first } * ', '}" if options[:order] && (include_eager_conditions?(options) || include_eager_order?(options))
|
||||
sql << " FROM #{table_name} "
|
||||
|
||||
if include_eager_conditions?(options) || include_eager_order?(options)
|
||||
sql << join_dependency.join_associations.collect{|join| join.association_join }.join
|
||||
sql << join_dependency.join_associations.collect(&:association_join).join
|
||||
add_joins!(sql, options, scope)
|
||||
end
|
||||
|
||||
@@ -1209,7 +1208,7 @@ module ActiveRecord
|
||||
add_limit!(sql, options, scope)
|
||||
return sanitize_sql(sql)
|
||||
end
|
||||
|
||||
|
||||
# Checks if the conditions reference a table other than the current model table
|
||||
def include_eager_conditions?(options)
|
||||
# look in both sets of conditions
|
||||
|
||||
@@ -111,6 +111,10 @@ module ActiveRecord
|
||||
63
|
||||
end
|
||||
|
||||
def requires_order_columns_in_distinct_clause? # :nodoc:
|
||||
true
|
||||
end
|
||||
|
||||
# QUOTING ==================================================
|
||||
|
||||
def quote(value, column = nil)
|
||||
|
||||
Reference in New Issue
Block a user