diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-28 08:49:23 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-28 08:49:23 +0000 |
commit | 8f5c12e451cc0ad5e3a9dd54f1fe882acae5b83b (patch) | |
tree | d98ebb0efde8ad18cb84b193bfd907ebb281a6e6 /activerecord/test | |
parent | 799f556fe1795c0c94dd5bf09ca84426e861de33 (diff) | |
download | rails-8f5c12e451cc0ad5e3a9dd54f1fe882acae5b83b.tar.gz rails-8f5c12e451cc0ad5e3a9dd54f1fe882acae5b83b.tar.bz2 rails-8f5c12e451cc0ad5e3a9dd54f1fe882acae5b83b.zip |
MySQL: SET SQL_AUTO_IS_NULL=0 so 'where id is null' doesn't select the last inserted id. Closes #6778.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6064 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/finder_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb index 1e6e4cf6cd..eb1e4d639c 100644 --- a/activerecord/test/finder_test.rb +++ b/activerecord/test/finder_test.rb @@ -460,6 +460,12 @@ class FinderTest < Test::Unit::TestCase end end + # http://dev.rubyonrails.org/ticket/6778 + def test_find_ignores_previously_inserted_record + post = Post.create! + assert_equal [], Post.find_all_by_id(nil) + end + def test_find_by_empty_ids assert_equal [], Post.find([]) end |