This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit ed99dda174da439a0947cdabea3babf027c672ac
tree 4bb8781de7a4bf99d93d577446b2b74537332fe4
parent c67e985994362290308073ed2793dd8e7f2a76db
tree 4bb8781de7a4bf99d93d577446b2b74537332fe4
parent c67e985994362290308073ed2793dd8e7f2a76db
... |
... |
|
... |
... |
|












There’s an issue which has cropped up in this method, which is that there’s no need to LOWER the column in MySQL (which the comments even acknowledge), and yet MySQL is penalized in the case insensitive mode with unnecessary and utter destruction of its index utilitization. It wasn’t an issue before 2.1 because validates_uniqueness_of was effectively insensitive by default on MySQL (oops).
I second kemiller’s comment. It’s a big issue on large tables with millions or rows getting scanned.
As a temporary fix, I overrode validations.rb at line 627 with:
oops, what I just wrote was wrong, I meant:
if value.nil? || (configuration[:case_sensitive] || !is_text_column) || self.connection.is_a?(ActiveRecord::ConnectionAdapters::MysqlAdapter)
Please open a thread on the core mailing list http://groups.google.com/group/rubyonrails-core rather than discussing this here, otherwise it’s likely to get forgotten and not be fixed in the next point release.