Skip to content

Commit

Permalink
properly name schema queries for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Apr 11, 2011
1 parent 32dbf00 commit f9d3f01
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -506,7 +506,7 @@ def collation

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
Expand Down Expand Up @@ -551,7 +551,7 @@ def indexes(table_name, name = nil)#:nodoc:
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
Expand Down Expand Up @@ -638,7 +638,7 @@ def show_variable(name)
# 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
Expand Down

0 comments on commit f9d3f01

Please sign in to comment.