Changeset 6064
- Timestamp:
- 01/28/07 08:49:23 (2 years ago)
- Files:
-
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb (modified) (1 diff)
- trunk/activerecord/test/finder_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r6061 r6064 1 1 *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] 2 4 3 5 * Use Date#to_s(:db) for quoted dates. #7411 [Michael Schoen] trunk/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
r6044 r6064 389 389 @connection.real_connect(*@connection_options) 390 390 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") 391 395 end 392 396 trunk/activerecord/test/finder_test.rb
r5876 r6064 461 461 end 462 462 463 # http://dev.rubyonrails.org/ticket/6778 464 def test_find_ignores_previously_inserted_record 465 post = Post.create! 466 assert_equal [], Post.find_all_by_id(nil) 467 end 468 463 469 def test_find_by_empty_ids 464 470 assert_equal [], Post.find([])