Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8015

Show
Ignore:
Timestamp:
10/25/07 18:53:07 (11 months ago)
Author:
nzkoz
Message:

Remove superfluous code and quote table name. References #9971 [jkit, nzkoz]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb

    r8012 r8015  
    443443      # Returns a table's primary key and belonging sequence. 
    444444      def pk_and_sequence_for(table) #:nodoc: 
    445         table_desc_result = execute("describe #{table}") 
    446445        keys = [] 
    447         execute("describe #{table}").each_hash do |h| 
     446        execute("describe #{quote_table_name(table)}").each_hash do |h| 
    448447          keys << h["Field"]if h["Key"] == "PRI" 
    449448        end