aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-10-20 21:17:31 +0000
committerRick Olson <technoweenie@gmail.com>2007-10-20 21:17:31 +0000
commit7042163d7633c1d453bcbed127d42ea27da6b939 (patch)
tree4ae064b8dbfb4433fd0ded03999574a0082138a7 /activerecord/test
parentc9fecf20ffb051ebc9270bfd787fd2964349d19a (diff)
downloadrails-7042163d7633c1d453bcbed127d42ea27da6b939.tar.gz
rails-7042163d7633c1d453bcbed127d42ea27da6b939.tar.bz2
rails-7042163d7633c1d453bcbed127d42ea27da6b939.zip
Ensure that mysql quotes table names with database names correctly. Closes #9911 [crayz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7980 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/active_schema_test_mysql.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/active_schema_test_mysql.rb b/activerecord/test/active_schema_test_mysql.rb
index aa1d712409..673c86c7ce 100644
--- a/activerecord/test/active_schema_test_mysql.rb
+++ b/activerecord/test/active_schema_test_mysql.rb
@@ -32,6 +32,10 @@ class ActiveSchemaTest < Test::Unit::TestCase
assert_equal "ALTER TABLE `people` ADD `key` varchar(32)", add_column(:people, :key, :string, :limit => 32)
end
+ def test_drop_table_with_specific_database
+ assert_equal "DROP TABLE `otherdb`.`people`", drop_table('otherdb.people')
+ end
+
private
def method_missing(method_symbol, *arguments)
ActiveRecord::Base.connection.send(method_symbol, *arguments)