Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Make MysqlAdapter.table_exists? to respect the mysql configuation lower_case_table_names

#3517

MysqlAdapter.table_exists? method doesn't work well when mysql is configured with lower_case_table_names = 1 in my.cnf.

This causes the following code to fail when running the command rake test on the rails branch from the second time onwards.

rails/activerecord/test/schema.rb

  create_table "CamelCase", :force => true do |t| t.string :name ;  end

Reason: Since, we are passing the :force option to the create_table method, it will try to first drop the table if exists. But table_exists?('CamelCase') will return false though we already have the table created when we ran the test for the first time. As it returned false, we directly create the table without even dropping it. This will raise the 'Table already exists' excpetion.

Reported by Arun Kumar Arjunan · November 29th, 2009 @ 08:56 AM

State: stale
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to stale
    • Importance changed from to

    Marking ticket as stale. If this is still an issue please make a comment with suggested changes, creating a patch with tests, or rebasing an existing patch or just confirming the issue on latest releases/master.

    October 6th, 2010 @ 06:28 AM