diff --git a/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb index 7df00b4a6b..42ca9bc732 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb @@ -206,7 +206,7 @@ module ActiveRecord def data_source_sql(name = nil, type: nil) scope = quoted_scope(name, type: type) - sql = +"SELECT table_name FROM (SELECT * FROM information_schema.tables " + sql = +"SELECT table_name FROM (SELECT table_name, table_type FROM information_schema.tables " sql << " WHERE table_schema = #{scope[:schema]}) _subquery" if scope[:type] || scope[:name] conditions = []