Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 5075

Show
Ignore:
Timestamp:
09/08/06 22:01:00 (3 years ago)
Author:
david
Message:

We cant make MySQL 5 happy if it means making SQLite and PostgreSQL cry. So currently MySQL 5 is not fully supported for Rails when youre using eager loading (closes #6133, #6135). I have contacted MySQL to make them fix http://bugs.mysql.com/bug.php?id=13551 [DHH]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_view/helpers/form_helper.rb

    r4613 r5075  
    413413      self.field_helpers = (FormHelper.instance_methods - ['form_for']) 
    414414 
    415       attr_accessor :object_name, :object 
     415      attr_accessor :object_name, :object, :options 
    416416 
    417417      def initialize(object_name, object, template, options, proc) 
  • trunk/activerecord/CHANGELOG

    r5073 r5075  
    11*SVN* 
    2  
    3 * Added parentheses around FROM clauses generated by Base and associations since MySQL 5 claim that to be the standard (and will screw up joins if its not there), see http://bugs.mysql.com/bug.php?id=13551 [DHH] 
    42 
    53* Rename AR::Base#quote so people can use that name in their models. #3628 [Koz] 
  • trunk/activerecord/lib/active_record/associations.rb

    r5073 r5075  
    11321132        def construct_finder_sql_with_included_associations(options, join_dependency) 
    11331133          scope = scope(:find) 
    1134           sql = "SELECT #{column_aliases(join_dependency)} FROM (#{(scope && scope[:from]) || options[:from] || table_name})
     1134          sql = "SELECT #{column_aliases(join_dependency)} FROM #{(scope && scope[:from]) || options[:from] || table_name}
    11351135          sql << join_dependency.join_associations.collect{|join| join.association_join }.join 
    11361136  
  • trunk/activerecord/lib/active_record/base.rb

    r5073 r5075  
    10901090          scope = scope(:find) 
    10911091          sql  = "SELECT #{(scope && scope[:select]) || options[:select] || '*'} " 
    1092           sql << "FROM (#{(scope && scope[:from]) || options[:from] || table_name})
     1092          sql << "FROM #{(scope && scope[:from]) || options[:from] || table_name}
    10931093 
    10941094          add_joins!(sql, options, scope)