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

Changeset 6065

Show
Ignore:
Timestamp:
01/28/07 08:51:33 (2 years ago)
Author:
bitsweat
Message:

Merge [6064] from trunk. References #6778.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1-2-stable/activerecord/CHANGELOG

    r6024 r6065  
    11*SVN* 
     2 
     3* MySQL: SET SQL_AUTO_IS_NULL=0 so 'where id is null' doesn't select the last inserted id.  #6778 [Jonathan Viney, timc] 
    24 
    35* Fixtures use the table name and connection from set_fixture_class.  #7330 [Anthony Eden] 
  • branches/1-2-stable/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb

    r5983 r6065  
    389389          @connection.real_connect(*@connection_options) 
    390390          execute("SET NAMES '#{encoding}'") if encoding 
     391 
     392          # By default, MySQL 'where id is null' selects the last inserted id. 
     393          # Turn this off. http://dev.rubyonrails.org/ticket/6778 
     394          execute("SET SQL_AUTO_IS_NULL=0") 
    391395        end 
    392396 
  • branches/1-2-stable/activerecord/test/finder_test.rb

    r5796 r6065  
    451451  end 
    452452 
     453  # http://dev.rubyonrails.org/ticket/6778 
     454  def test_find_ignores_previously_inserted_record 
     455    post = Post.create! 
     456    assert_equal [], Post.find_all_by_id(nil) 
     457  end 
     458 
    453459  def test_find_by_empty_ids 
    454460    assert_equal [], Post.find([])