diff options
author | kennyj <kennyj@gmail.com> | 2012-03-03 22:25:15 +0900 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-06-11 11:00:29 -0700 |
commit | 22994b2d638738abce7dc7672c27a5e7171018e8 (patch) | |
tree | 15032a734030d873f408032103949a156191d4cd /activerecord/lib | |
parent | 0391ae9a14af1a87ca435eb7777c73271e859ae0 (diff) | |
download | rails-22994b2d638738abce7dc7672c27a5e7171018e8.tar.gz rails-22994b2d638738abce7dc7672c27a5e7171018e8.tar.bz2 rails-22994b2d638738abce7dc7672c27a5e7171018e8.zip |
Fix GH #3163. Should quote database on mysql/mysql2.
Conflicts:
activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb index 2658c444d1..88f82b5e35 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb @@ -375,7 +375,7 @@ module ActiveRecord def tables(name = nil, database = nil, like = nil) #:nodoc: sql = "SHOW TABLES " - sql << "IN #{database} " if database + sql << "IN #{quote_table_name(database)} " if database sql << "LIKE #{quote(like)}" if like execute_and_free(sql, 'SCHEMA') do |result| |