aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-04-08 16:44:54 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-04-11 10:10:00 -0700
commitf9d3f018669bc96b107cfa802d2fa9b0b5555717 (patch)
tree1b53c59a91dc5a65850fbc1b3ee50c308f1fce54 /activerecord
parent32dbf00d99c28b0ce143ceb5f94abcd93019eb61 (diff)
downloadrails-f9d3f018669bc96b107cfa802d2fa9b0b5555717.tar.gz
rails-f9d3f018669bc96b107cfa802d2fa9b0b5555717.tar.bz2
rails-f9d3f018669bc96b107cfa802d2fa9b0b5555717.zip
properly name schema queries for logging
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/mysql_adapter.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
index ceee2ab73a..33add72283 100644
--- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
@@ -506,7 +506,7 @@ module ActiveRecord
def tables(name = nil, database = nil) #:nodoc:
tables = []
- result = execute(["SHOW TABLES", database].compact.join(' IN '), name)
+ result = execute(["SHOW TABLES", database].compact.join(' IN '), 'SCHEMA')
result.each { |field| tables << field[0] }
result.free
tables
@@ -551,7 +551,7 @@ module ActiveRecord
def columns(table_name, name = nil)#:nodoc:
sql = "SHOW FIELDS FROM #{quote_table_name(table_name)}"
columns = []
- result = execute(sql)
+ result = execute(sql, 'SCHEMA')
result.each { |field| columns << MysqlColumn.new(field[0], field[4], field[1], field[2] == "YES") }
result.free
columns
@@ -638,7 +638,7 @@ module ActiveRecord
# Returns a table's primary key and belonging sequence.
def pk_and_sequence_for(table) #:nodoc:
keys = []
- result = execute("describe #{quote_table_name(table)}")
+ result = execute("describe #{quote_table_name(table)}", 'SCHEMA')
result.each_hash do |h|
keys << h["Field"]if h["Key"] == "PRI"
end