mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #43549 from cgriego/no-select-all-from-information-schema-tables
Don't `SELECT * FROM information_schema.tables`
This commit is contained in:
commit
a93a8f1a56
1 changed files with 1 additions and 1 deletions
|
@ -206,7 +206,7 @@ module ActiveRecord
|
||||||
def data_source_sql(name = nil, type: nil)
|
def data_source_sql(name = nil, type: nil)
|
||||||
scope = quoted_scope(name, type: type)
|
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"
|
sql << " WHERE table_schema = #{scope[:schema]}) _subquery"
|
||||||
if scope[:type] || scope[:name]
|
if scope[:type] || scope[:name]
|
||||||
conditions = []
|
conditions = []
|
||||||
|
|
Loading…
Reference in a new issue