diff options
author | kennyj <kennyj@gmail.com> | 2012-03-03 22:25:15 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-03-05 00:07:20 +0900 |
commit | 69c7f024882f8150a2bda8536e1480d19c982e04 (patch) | |
tree | b437b410e81cef4cc07a045af528faf8a228e89d /activerecord/lib | |
parent | 223549f420583e8cfaa280542da679d6c6045b44 (diff) | |
download | rails-69c7f024882f8150a2bda8536e1480d19c982e04.tar.gz rails-69c7f024882f8150a2bda8536e1480d19c982e04.tar.bz2 rails-69c7f024882f8150a2bda8536e1480d19c982e04.zip |
Fix GH #3163. Should quote database on mysql/mysql2.
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 e33903622b..731c07547a 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| |